Commit 38183049 authored by Filipa Lacerda's avatar Filipa Lacerda Committed by Phil Hughes

Sets the deploy board to be closed by default

parent 27665edc
...@@ -66,9 +66,7 @@ ...@@ -66,9 +66,7 @@
<template> <template>
<div class="js-deploy-board deploy-board"> <div class="js-deploy-board deploy-board">
<div v-if="isLoading"> <loading-icon v-if="isLoading" />
<loading-icon />
</div>
<div v-if="canRenderDeployBoard"> <div v-if="canRenderDeployBoard">
......
...@@ -68,9 +68,7 @@ export default class EnvironmentsStore { ...@@ -68,9 +68,7 @@ export default class EnvironmentsStore {
if (filtered.size === 1 && filtered.rollout_status_path) { if (filtered.size === 1 && filtered.rollout_status_path) {
filtered = Object.assign({}, filtered, { filtered = Object.assign({}, filtered, {
hasDeployBoard: true, hasDeployBoard: true,
isDeployBoardVisible: oldEnvironmentState.isDeployBoardVisible === false ? isDeployBoardVisible: oldEnvironmentState.isDeployBoardVisible || false,
oldEnvironmentState.isDeployBoardVisible :
true,
deployBoardData: oldEnvironmentState.deployBoardData || {}, deployBoardData: oldEnvironmentState.deployBoardData || {},
isLoadingDeployBoard: oldEnvironmentState.isLoadingDeployBoard || false, isLoadingDeployBoard: oldEnvironmentState.isLoadingDeployBoard || false,
hasErrorDeployBoard: oldEnvironmentState.hasErrorDeployBoard || false, hasErrorDeployBoard: oldEnvironmentState.hasErrorDeployBoard || false,
......
...@@ -31,7 +31,7 @@ describe('Store', () => { ...@@ -31,7 +31,7 @@ describe('Store', () => {
updated_at: '2017-01-31T10:53:46.894Z', updated_at: '2017-01-31T10:53:46.894Z',
rollout_status_path: '/path', rollout_status_path: '/path',
hasDeployBoard: true, hasDeployBoard: true,
isDeployBoardVisible: true, isDeployBoardVisible: false,
deployBoardData: {}, deployBoardData: {},
isLoadingDeployBoard: false, isLoadingDeployBoard: false,
hasErrorDeployBoard: false, hasErrorDeployBoard: false,
...@@ -70,7 +70,7 @@ describe('Store', () => { ...@@ -70,7 +70,7 @@ describe('Store', () => {
store.storeEnvironments([environment]); store.storeEnvironments([environment]);
expect(store.state.environments[0].hasDeployBoard).toEqual(true); expect(store.state.environments[0].hasDeployBoard).toEqual(true);
expect(store.state.environments[0].isDeployBoardVisible).toEqual(true); expect(store.state.environments[0].isDeployBoardVisible).toEqual(false);
expect(store.state.environments[0].deployBoardData).toEqual({}); expect(store.state.environments[0].deployBoardData).toEqual({});
}); });
...@@ -201,7 +201,7 @@ describe('Store', () => { ...@@ -201,7 +201,7 @@ describe('Store', () => {
it('should toggle deploy board property for given environment id', () => { it('should toggle deploy board property for given environment id', () => {
store.toggleDeployBoard(1); store.toggleDeployBoard(1);
expect(store.state.environments[0].isDeployBoardVisible).toEqual(false); expect(store.state.environments[0].isDeployBoardVisible).toEqual(true);
}); });
it('should store deploy board data for given environment id', () => { it('should store deploy board data for given environment id', () => {
...@@ -248,8 +248,7 @@ describe('Store', () => { ...@@ -248,8 +248,7 @@ describe('Store', () => {
store.storeEnvironments([environment]); store.storeEnvironments([environment]);
expect(store.getOpenDeployBoards().length).toEqual(1); expect(store.getOpenDeployBoards().length).toEqual(0);
expect(store.getOpenDeployBoards()[0].id).toEqual(environment.latest.id);
}); });
}); });
}); });
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