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 {
if (filtered.size > 1) {
filtered = Object.assign(filtered, env, { isFolder: true, folderName: env.name });
} else if (filtered.size === 1 && filtered.rollout_status_path) {
filtered = Object.assign(filtered, env, {
filtered = Object.assign({}, env, filtered, {
hasDeployBoard: true,
isDeployBoardVisible: false,
deployBoardData: {},
......
......@@ -184,6 +184,7 @@
.deploy-board-instances {
order: 2;
margin-left: 20px;
width: 100%;
.text {
color: $gl-text-color-secondary;
......
......@@ -63,6 +63,16 @@ import { serverData, deployBoardMockData } from './mock_data';
expect(store.state.environments[0].last_deployment).toEqual({});
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', () => {
......
......@@ -66,6 +66,23 @@ export const serverData = [
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 = {
......
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