Commit 61517b8e authored by Filipa Lacerda's avatar Filipa Lacerda

Adjustments to received API response to use rollout_status_path key

parent 01d5a4dd
......@@ -30,7 +30,7 @@ class EnvironmentsStore {
* If the `size` is bigger than 1, it means it should be rendered as a folder.
* In those cases we add `isFolder` key in order to render it properly.
*
* Top level environments - when the size is 1 - with `rollout_status`
* Top level environments - when the size is 1 - with `rollout_status_path`
* can render a deploy board. We add `isDeployBoardVisible` and `deployBoardData`
* keys to those environments.
* The first key will let's us know if we should or not render the deploy board.
......@@ -54,7 +54,7 @@ class EnvironmentsStore {
if (filtered.size > 1) {
filtered = Object.assign(filtered, env, { isFolder: true, folderName: env.name });
} else if (filtered.size === 1 && filtered.rollout_status) {
} else if (filtered.size === 1 && filtered.rollout_status_path) {
filtered = Object.assign(filtered, env, {
hasDeployBoard: true,
isDeployBoardVisible: false,
......
......@@ -36,7 +36,7 @@ describe('Environment item', () => {
size: 1,
environment_path: 'url',
id: 1,
rollout_status: 'url',
rollout_status_path: 'url',
hasDeployBoard: true,
deployBoardData: {
instances: [
......@@ -74,7 +74,7 @@ describe('Environment item', () => {
size: 1,
environment_path: 'url',
id: 1,
rollout_status: 'url',
rollout_status_path: 'url',
hasDeployBoard: true,
deployBoardData: {
instances: [
......
......@@ -22,12 +22,12 @@ const { serverData, deployBoardMockData } = require('./mock_data');
expect(store.state.environments.length).toEqual(serverData.length);
});
it('should store a non folder environment with deploy board if rollout_status key is provided', () => {
it('should store a non folder environment with deploy board if rollout_status_path key is provided', () => {
const environment = {
name: 'foo',
size: 1,
id: 1,
rollout_status: 'url',
rollout_status_path: 'url',
};
store.storeEnvironments([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