Commit 636e1023 authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Merge branch '1927-deploy-boards-regression' into 'master'

Deploy board left align pods and fix folder name

Closes #1927 and #1928

See merge request !1465
parents 67e51e9c c8ff0e77
...@@ -55,7 +55,7 @@ export default class EnvironmentsStore { ...@@ -55,7 +55,7 @@ export default class EnvironmentsStore {
if (filtered.size > 1) { if (filtered.size > 1) {
filtered = Object.assign(filtered, env, { isFolder: true, folderName: env.name }); filtered = Object.assign(filtered, env, { isFolder: true, folderName: env.name });
} else if (filtered.size === 1 && filtered.rollout_status_path) { } else if (filtered.size === 1 && filtered.rollout_status_path) {
filtered = Object.assign(filtered, env, { filtered = Object.assign({}, env, filtered, {
hasDeployBoard: true, hasDeployBoard: true,
isDeployBoardVisible: false, isDeployBoardVisible: false,
deployBoardData: {}, deployBoardData: {},
......
...@@ -184,6 +184,7 @@ ...@@ -184,6 +184,7 @@
.deploy-board-instances { .deploy-board-instances {
order: 2; order: 2;
margin-left: 20px; margin-left: 20px;
width: 100%;
.text { .text {
color: $gl-text-color-secondary; color: $gl-text-color-secondary;
......
...@@ -63,6 +63,16 @@ import { serverData, deployBoardMockData } from './mock_data'; ...@@ -63,6 +63,16 @@ import { serverData, deployBoardMockData } from './mock_data';
expect(store.state.environments[0].last_deployment).toEqual({}); expect(store.state.environments[0].last_deployment).toEqual({});
expect(store.state.environments[0].isStoppable).toEqual(true); expect(store.state.environments[0].isStoppable).toEqual(true);
}); });
it('should store latest.name when the environment is not a folder', () => {
store.storeEnvironments(serverData);
expect(store.state.environments[2].name).toEqual(serverData[2].latest.name);
});
it('should store root level name when environment is a folder', () => {
store.storeEnvironments(serverData);
expect(store.state.environments[1].name).toEqual(serverData[1].name);
});
}); });
it('should store available count', () => { it('should store available count', () => {
......
...@@ -66,6 +66,23 @@ export const serverData = [ ...@@ -66,6 +66,23 @@ export const serverData = [
updated_at: '2017-02-01T19:42:18.400Z', updated_at: '2017-02-01T19:42:18.400Z',
}, },
}, },
{
name: 'build',
size: 1,
latest: {
id: 12,
name: 'build/update-README',
state: 'available',
external_url: null,
environment_type: 'build',
last_deployment: null,
'stop_action?': false,
environment_path: '/root/review-app/environments/12',
stop_path: '/root/review-app/environments/12/stop',
created_at: '2017-02-01T19:42:18.400Z',
updated_at: '2017-02-01T19:42:18.400Z',
},
},
]; ];
export const environment = { export const environment = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment