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