Commit e64975e8 authored by Fatih Acet's avatar Fatih Acet

Merge branch '208470_01-geo-replicable-mutations' into 'master'

Geo Replicable - Generalize Mutations

See merge request gitlab-org/gitlab!26697
parents ed6dbb83 163c5764
......@@ -10,17 +10,17 @@ import {
import * as types from './mutation_types';
import { FILTER_STATES } from './constants';
// Fetch Designs
export const requestDesigns = ({ commit }) => commit(types.REQUEST_DESIGNS);
export const receiveDesignsSuccess = ({ commit }, data) =>
commit(types.RECEIVE_DESIGNS_SUCCESS, data);
export const receiveDesignsError = ({ commit }) => {
createFlash(__('There was an error fetching the Designs'));
commit(types.RECEIVE_DESIGNS_ERROR);
// Fetch Replicable Items
export const requestReplicableItems = ({ commit }) => commit(types.REQUEST_REPLICABLE_ITEMS);
export const receiveReplicableItemsSuccess = ({ commit }, data) =>
commit(types.RECEIVE_REPLICABLE_ITEMS_SUCCESS, data);
export const receiveReplicableItemsError = ({ commit }) => {
createFlash(__('There was an error fetching the designs'));
commit(types.RECEIVE_REPLICABLE_ITEMS_ERROR);
};
export const fetchDesigns = ({ state, dispatch }) => {
dispatch('requestDesigns');
dispatch('requestReplicableItems');
const statusFilterName = state.filterOptions[state.currentFilterIndex]
? state.filterOptions[state.currentFilterIndex]
......@@ -37,59 +37,60 @@ export const fetchDesigns = ({ state, dispatch }) => {
const paginationInformation = parseIntPagination(normalizedHeaders);
const camelCaseData = convertObjectPropsToCamelCase(res.data, { deep: true });
dispatch('receiveDesignsSuccess', {
dispatch('receiveReplicableItemsSuccess', {
data: camelCaseData,
perPage: paginationInformation.perPage,
total: paginationInformation.total,
});
})
.catch(() => {
dispatch('receiveDesignsError');
dispatch('receiveReplicableItemsError');
});
};
// Initiate All Design Syncs
export const requestInitiateAllDesignSyncs = ({ commit }) =>
commit(types.REQUEST_INITIATE_ALL_DESIGN_SYNCS);
export const receiveInitiateAllDesignSyncsSuccess = ({ commit, dispatch }, { action }) => {
// Initiate All Replicable Syncs
export const requestInitiateAllReplicableSyncs = ({ commit }) =>
commit(types.REQUEST_INITIATE_ALL_REPLICABLE_SYNCS);
export const receiveInitiateAllReplicableSyncsSuccess = ({ commit, dispatch }, { action }) => {
toast(__(`All designs are being scheduled for ${action}`));
commit(types.RECEIVE_INITIATE_ALL_DESIGN_SYNCS_SUCCESS);
dispatch('fetchDesigns');
commit(types.RECEIVE_INITIATE_ALL_REPLICABLE_SYNCS_SUCCESS);
dispatch('fetchReplicableItems');
};
export const receiveInitiateAllDesignSyncsError = ({ commit }) => {
createFlash(__(`There was an error syncing the Design Repositories.`));
commit(types.RECEIVE_INITIATE_ALL_DESIGN_SYNCS_ERROR);
export const receiveInitiateAllReplicableSyncsError = ({ commit }) => {
createFlash(__('There was an error syncing the designs.'));
commit(types.RECEIVE_INITIATE_ALL_REPLICABLE_SYNCS_ERROR);
};
export const initiateAllDesignSyncs = ({ dispatch }, action) => {
dispatch('requestInitiateAllDesignSyncs');
dispatch('requestInitiateAllReplicableSyncs');
Api.initiateAllGeoDesignSyncs(action)
.then(() => dispatch('receiveInitiateAllDesignSyncsSuccess', { action }))
.then(() => dispatch('receiveInitiateAllReplicableSyncsSuccess', { action }))
.catch(() => {
dispatch('receiveInitiateAllDesignSyncsError');
dispatch('receiveInitiateAllReplicableSyncsError');
});
};
// Initiate Design Sync
export const requestInitiateDesignSync = ({ commit }) => commit(types.REQUEST_INITIATE_DESIGN_SYNC);
export const receiveInitiateDesignSyncSuccess = ({ commit, dispatch }, { name, action }) => {
// Initiate Replicable Sync
export const requestInitiateReplicableSync = ({ commit }) =>
commit(types.REQUEST_INITIATE_REPLICABLE_SYNC);
export const receiveInitiateReplicableSyncSuccess = ({ commit, dispatch }, { name, action }) => {
toast(__(`${name} is scheduled for ${action}`));
commit(types.RECEIVE_INITIATE_DESIGN_SYNC_SUCCESS);
dispatch('fetchDesigns');
commit(types.RECEIVE_INITIATE_REPLICABLE_SYNC_SUCCESS);
dispatch('fetchReplicableItems');
};
export const receiveInitiateDesignSyncError = ({ commit }, { name }) => {
export const receiveInitiateReplicableSyncError = ({ commit }, { name }) => {
createFlash(__(`There was an error syncing project '${name}'`));
commit(types.RECEIVE_INITIATE_DESIGN_SYNC_ERROR);
commit(types.RECEIVE_INITIATE_REPLICABLE_SYNC_ERROR);
};
export const initiateDesignSync = ({ dispatch }, { projectId, name, action }) => {
dispatch('requestInitiateDesignSync');
dispatch('requestInitiateReplicableSync');
Api.initiateGeoDesignSync({ projectId, action })
.then(() => dispatch('receiveInitiateDesignSyncSuccess', { name, action }))
.then(() => dispatch('receiveInitiateReplicableSyncSuccess', { name, action }))
.catch(() => {
dispatch('receiveInitiateDesignSyncError', { name });
dispatch('receiveInitiateReplicableSyncError', { name });
});
};
......
......@@ -2,15 +2,16 @@ export const SET_FILTER = 'SET_FILTER';
export const SET_SEARCH = 'SET_SEARCH';
export const SET_PAGE = 'SET_PAGE';
export const REQUEST_DESIGNS = 'REQUEST_DESIGNS';
export const RECEIVE_DESIGNS_SUCCESS = 'RECEIVE_DESIGNS_SUCCESS';
export const RECEIVE_DESIGNS_ERROR = 'RECEIVE_DESIGNS_ERROR';
export const REQUEST_REPLICABLE_ITEMS = 'REQUEST_REPLICABLE_ITEMS';
export const RECEIVE_REPLICABLE_ITEMS_SUCCESS = 'RECEIVE_REPLICABLE_ITEMS_SUCCESS';
export const RECEIVE_REPLICABLE_ITEMS_ERROR = 'RECEIVE_REPLICABLE_ITEMS_ERROR';
export const REQUEST_INITIATE_ALL_DESIGN_SYNCS = 'REQUEST_INITIATE_ALL_DESIGN_SYNCS';
export const RECEIVE_INITIATE_ALL_DESIGN_SYNCS_SUCCESS =
'RECEIVE_INITIATE_ALL_DESIGN_SYNCS_SUCCESS';
export const RECEIVE_INITIATE_ALL_DESIGN_SYNCS_ERROR = 'RECEIVE_INITIATE_ALL_DESIGN_SYNCS_ERROR';
export const REQUEST_INITIATE_ALL_REPLICABLE_SYNCS = 'REQUEST_INITIATE_ALL_REPLICABLE_SYNCS';
export const RECEIVE_INITIATE_ALL_REPLICABLE_SYNCS_SUCCESS =
'RECEIVE_INITIATE_ALL_REPLICABLE_SYNCS_SUCCESS';
export const RECEIVE_INITIATE_ALL_REPLICABLE_SYNCS_ERROR =
'RECEIVE_INITIATE_ALL_REPLICABLE_SYNCS_ERROR';
export const REQUEST_INITIATE_DESIGN_SYNC = 'REQUEST_INITIATE_DESIGN_SYNC';
export const RECEIVE_INITIATE_DESIGN_SYNC_SUCCESS = 'RECEIVE_INITIATE_DESIGN_SYNC_SUCCESS';
export const RECEIVE_INITIATE_DESIGN_SYNC_ERROR = 'RECEIVE_INITIATE_DESIGN_SYNC_ERROR';
export const REQUEST_INITIATE_REPLICABLE_SYNC = 'REQUEST_INITIATE_REPLICABLE_SYNC';
export const RECEIVE_INITIATE_REPLICABLE_SYNC_SUCCESS = 'RECEIVE_INITIATE_REPLICABLE_SYNC_SUCCESS';
export const RECEIVE_INITIATE_REPLICABLE_SYNC_ERROR = 'RECEIVE_INITIATE_REPLICABLE_SYNC_ERROR';
......@@ -12,37 +12,37 @@ export default {
[types.SET_PAGE](state, page) {
state.currentPage = page;
},
[types.REQUEST_DESIGNS](state) {
[types.REQUEST_REPLICABLE_ITEMS](state) {
state.isLoading = true;
},
[types.RECEIVE_DESIGNS_SUCCESS](state, { data, perPage, total }) {
[types.RECEIVE_REPLICABLE_ITEMS_SUCCESS](state, { data, perPage, total }) {
state.isLoading = false;
state.designs = data;
state.pageSize = perPage;
state.totalDesigns = total;
},
[types.RECEIVE_DESIGNS_ERROR](state) {
[types.RECEIVE_REPLICABLE_ITEMS_ERROR](state) {
state.isLoading = false;
state.designs = [];
state.pageSize = 0;
state.totalDesigns = 0;
},
[types.REQUEST_INITIATE_ALL_DESIGN_SYNCS](state) {
[types.REQUEST_INITIATE_ALL_REPLICABLE_SYNCS](state) {
state.isLoading = true;
},
[types.RECEIVE_INITIATE_ALL_DESIGN_SYNCS_SUCCESS](state) {
[types.RECEIVE_INITIATE_ALL_REPLICABLE_SYNCS_SUCCESS](state) {
state.isLoading = false;
},
[types.RECEIVE_INITIATE_ALL_DESIGN_SYNCS_ERROR](state) {
[types.RECEIVE_INITIATE_ALL_REPLICABLE_SYNCS_ERROR](state) {
state.isLoading = false;
},
[types.REQUEST_INITIATE_DESIGN_SYNC](state) {
[types.REQUEST_INITIATE_REPLICABLE_SYNC](state) {
state.isLoading = true;
},
[types.RECEIVE_INITIATE_DESIGN_SYNC_SUCCESS](state) {
[types.RECEIVE_INITIATE_REPLICABLE_SYNC_SUCCESS](state) {
state.isLoading = false;
},
[types.RECEIVE_INITIATE_DESIGN_SYNC_ERROR](state) {
[types.RECEIVE_INITIATE_REPLICABLE_SYNC_ERROR](state) {
state.isLoading = false;
},
};
......@@ -29,32 +29,39 @@ describe('GeoDesigns Store Actions', () => {
mock.restore();
});
describe('requestDesigns', () => {
it('should commit mutation REQUEST_DESIGNS', done => {
testAction(actions.requestDesigns, null, state, [{ type: types.REQUEST_DESIGNS }], [], done);
describe('requestReplicableItems', () => {
it('should commit mutation REQUEST_REPLICABLE_ITEMS', done => {
testAction(
actions.requestReplicableItems,
null,
state,
[{ type: types.REQUEST_REPLICABLE_ITEMS }],
[],
done,
);
});
});
describe('receiveDesignsSuccess', () => {
it('should commit mutation RECEIVE_DESIGNS_SUCCESS', done => {
describe('receiveReplicableItemsSuccess', () => {
it('should commit mutation RECEIVE_REPLICABLE_ITEMS_SUCCESS', done => {
testAction(
actions.receiveDesignsSuccess,
actions.receiveReplicableItemsSuccess,
MOCK_BASIC_FETCH_DATA_MAP,
state,
[{ type: types.RECEIVE_DESIGNS_SUCCESS, payload: MOCK_BASIC_FETCH_DATA_MAP }],
[{ type: types.RECEIVE_REPLICABLE_ITEMS_SUCCESS, payload: MOCK_BASIC_FETCH_DATA_MAP }],
[],
done,
);
});
});
describe('receiveDesignsError', () => {
it('should commit mutation RECEIVE_DESIGNS_ERROR', () => {
describe('receiveReplicableItemsError', () => {
it('should commit mutation RECEIVE_REPLICABLE_ITEMS_ERROR', () => {
testAction(
actions.receiveDesignsError,
actions.receiveReplicableItemsError,
null,
state,
[{ type: types.RECEIVE_DESIGNS_ERROR }],
[{ type: types.RECEIVE_REPLICABLE_ITEMS_ERROR }],
[],
() => {
expect(flash).toHaveBeenCalledTimes(1);
......@@ -79,8 +86,8 @@ describe('GeoDesigns Store Actions', () => {
state,
[],
[
{ type: 'requestDesigns' },
{ type: 'receiveDesignsSuccess', payload: MOCK_BASIC_FETCH_DATA_MAP },
{ type: 'requestReplicableItems' },
{ type: 'receiveReplicableItemsSuccess', payload: MOCK_BASIC_FETCH_DATA_MAP },
],
done,
);
......@@ -98,7 +105,7 @@ describe('GeoDesigns Store Actions', () => {
{},
state,
[],
[{ type: 'requestDesigns' }, { type: 'receiveDesignsError' }],
[{ type: 'requestReplicableItems' }, { type: 'receiveReplicableItemsError' }],
done,
);
});
......@@ -130,8 +137,8 @@ describe('GeoDesigns Store Actions', () => {
state,
[],
[
{ type: 'requestDesigns' },
{ type: 'receiveDesignsSuccess', payload: MOCK_BASIC_FETCH_DATA_MAP },
{ type: 'requestReplicableItems' },
{ type: 'receiveReplicableItemsSuccess', payload: MOCK_BASIC_FETCH_DATA_MAP },
],
fetchDesignsCall,
);
......@@ -161,8 +168,8 @@ describe('GeoDesigns Store Actions', () => {
state,
[],
[
{ type: 'requestDesigns' },
{ type: 'receiveDesignsSuccess', payload: MOCK_BASIC_FETCH_DATA_MAP },
{ type: 'requestReplicableItems' },
{ type: 'receiveReplicableItemsSuccess', payload: MOCK_BASIC_FETCH_DATA_MAP },
],
fetchDesignsCall,
);
......@@ -170,27 +177,27 @@ describe('GeoDesigns Store Actions', () => {
});
});
describe('requestInitiateAllDesignSyncs', () => {
it('should commit mutation REQUEST_INITIATE_ALL_DESIGN_SYNCS', done => {
describe('requestInitiateAllReplicableSyncs', () => {
it('should commit mutation REQUEST_INITIATE_ALL_REPLICABLE_SYNCS', done => {
testAction(
actions.requestInitiateAllDesignSyncs,
actions.requestInitiateAllReplicableSyncs,
null,
state,
[{ type: types.REQUEST_INITIATE_ALL_DESIGN_SYNCS }],
[{ type: types.REQUEST_INITIATE_ALL_REPLICABLE_SYNCS }],
[],
done,
);
});
});
describe('receiveInitiateAllDesignSyncsSuccess', () => {
it('should commit mutation RECEIVE_INITIATE_ALL_DESIGN_SYNCS_SUCCESS and call fetchDesigns and toast', () => {
describe('receiveInitiateAllReplicableSyncsSuccess', () => {
it('should commit mutation RECEIVE_INITIATE_ALL_REPLICABLE_SYNCS_SUCCESS and call fetchReplicableItems and toast', () => {
testAction(
actions.receiveInitiateAllDesignSyncsSuccess,
actions.receiveInitiateAllReplicableSyncsSuccess,
{ action: ACTION_TYPES.RESYNC },
state,
[{ type: types.RECEIVE_INITIATE_ALL_DESIGN_SYNCS_SUCCESS }],
[{ type: 'fetchDesigns' }],
[{ type: types.RECEIVE_INITIATE_ALL_REPLICABLE_SYNCS_SUCCESS }],
[{ type: 'fetchReplicableItems' }],
() => {
expect(toast).toHaveBeenCalledTimes(1);
toast.mockClear();
......@@ -199,13 +206,13 @@ describe('GeoDesigns Store Actions', () => {
});
});
describe('receiveInitiateAllDesignSyncsError', () => {
it('should commit mutation RECEIVE_INITIATE_ALL_DESIGN_SYNCS_ERROR', () => {
describe('receiveInitiateAllReplicableSyncsError', () => {
it('should commit mutation RECEIVE_INITIATE_ALL_REPLICABLE_SYNCS_ERROR', () => {
testAction(
actions.receiveInitiateAllDesignSyncsError,
actions.receiveInitiateAllReplicableSyncsError,
ACTION_TYPES.RESYNC,
state,
[{ type: types.RECEIVE_INITIATE_ALL_DESIGN_SYNCS_ERROR }],
[{ type: types.RECEIVE_INITIATE_ALL_REPLICABLE_SYNCS_ERROR }],
[],
() => {
expect(flash).toHaveBeenCalledTimes(1);
......@@ -232,8 +239,8 @@ describe('GeoDesigns Store Actions', () => {
state,
[],
[
{ type: 'requestInitiateAllDesignSyncs' },
{ type: 'receiveInitiateAllDesignSyncsSuccess', payload: { action } },
{ type: 'requestInitiateAllReplicableSyncs' },
{ type: 'receiveInitiateAllReplicableSyncsSuccess', payload: { action } },
],
done,
);
......@@ -254,8 +261,8 @@ describe('GeoDesigns Store Actions', () => {
state,
[],
[
{ type: 'requestInitiateAllDesignSyncs' },
{ type: 'receiveInitiateAllDesignSyncsError' },
{ type: 'requestInitiateAllReplicableSyncs' },
{ type: 'receiveInitiateAllReplicableSyncsError' },
],
done,
);
......@@ -263,27 +270,27 @@ describe('GeoDesigns Store Actions', () => {
});
});
describe('requestInitiateDesignSync', () => {
it('should commit mutation REQUEST_INITIATE_DESIGN_SYNC', done => {
describe('requestInitiateReplicableSync', () => {
it('should commit mutation REQUEST_INITIATE_REPLICABLE_SYNC', done => {
testAction(
actions.requestInitiateDesignSync,
actions.requestInitiateReplicableSync,
null,
state,
[{ type: types.REQUEST_INITIATE_DESIGN_SYNC }],
[{ type: types.REQUEST_INITIATE_REPLICABLE_SYNC }],
[],
done,
);
});
});
describe('receiveInitiateDesignSyncSuccess', () => {
it('should commit mutation RECEIVE_INITIATE_DESIGN_SYNC_SUCCESS and call fetchDesigns and toast', () => {
describe('receiveInitiateReplicableSyncSuccess', () => {
it('should commit mutation RECEIVE_INITIATE_REPLICABLE_SYNC_SUCCESS and call fetchReplicableItems and toast', () => {
testAction(
actions.receiveInitiateDesignSyncSuccess,
actions.receiveInitiateReplicableSyncSuccess,
{ action: ACTION_TYPES.RESYNC, projectName: 'test' },
state,
[{ type: types.RECEIVE_INITIATE_DESIGN_SYNC_SUCCESS }],
[{ type: 'fetchDesigns' }],
[{ type: types.RECEIVE_INITIATE_REPLICABLE_SYNC_SUCCESS }],
[{ type: 'fetchReplicableItems' }],
() => {
expect(toast).toHaveBeenCalledTimes(1);
toast.mockClear();
......@@ -292,13 +299,13 @@ describe('GeoDesigns Store Actions', () => {
});
});
describe('receiveInitiateDesignSyncError', () => {
it('should commit mutation RECEIVE_INITIATE_DESIGN_SYNC_ERROR', () => {
describe('receiveInitiateReplicableSyncError', () => {
it('should commit mutation RECEIVE_INITIATE_REPLICABLE_SYNC_ERROR', () => {
testAction(
actions.receiveInitiateDesignSyncError,
actions.receiveInitiateReplicableSyncError,
{ action: ACTION_TYPES.RESYNC, projectId: 1, projectName: 'test' },
state,
[{ type: types.RECEIVE_INITIATE_DESIGN_SYNC_ERROR }],
[{ type: types.RECEIVE_INITIATE_REPLICABLE_SYNC_ERROR }],
[],
() => {
expect(flash).toHaveBeenCalledTimes(1);
......@@ -329,8 +336,8 @@ describe('GeoDesigns Store Actions', () => {
state,
[],
[
{ type: 'requestInitiateDesignSync' },
{ type: 'receiveInitiateDesignSyncSuccess', payload: { name, action } },
{ type: 'requestInitiateReplicableSync' },
{ type: 'receiveInitiateReplicableSyncSuccess', payload: { name, action } },
],
done,
);
......@@ -353,9 +360,9 @@ describe('GeoDesigns Store Actions', () => {
state,
[],
[
{ type: 'requestInitiateDesignSync' },
{ type: 'requestInitiateReplicableSync' },
{
type: 'receiveInitiateDesignSyncError',
type: 'receiveInitiateReplicableSyncError',
payload: { name: 'test' },
},
],
......
......@@ -3,7 +3,7 @@ import createState from 'ee/geo_designs/store/state';
import * as types from 'ee/geo_designs/store/mutation_types';
import { MOCK_BASIC_FETCH_DATA_MAP } from '../mock_data';
describe('GeoDesigns Store Mutations', () => {
describe('GeoReplicable Store Mutations', () => {
let state;
beforeEach(() => {
state = createState();
......@@ -55,14 +55,14 @@ describe('GeoDesigns Store Mutations', () => {
});
});
describe('REQUEST_DESIGNS', () => {
describe('REQUEST_REPLICABLE_ITEMS', () => {
it('sets isLoading to true', () => {
mutations[types.REQUEST_DESIGNS](state);
mutations[types.REQUEST_REPLICABLE_ITEMS](state);
expect(state.isLoading).toEqual(true);
});
});
describe('RECEIVE_DESIGNS_SUCCESS', () => {
describe('RECEIVE_REPLICABLE_ITEMS_SUCCESS', () => {
let mockData = {};
beforeEach(() => {
......@@ -72,23 +72,23 @@ describe('GeoDesigns Store Mutations', () => {
it('sets isLoading to false', () => {
state.isLoading = true;
mutations[types.RECEIVE_DESIGNS_SUCCESS](state, mockData);
mutations[types.RECEIVE_REPLICABLE_ITEMS_SUCCESS](state, mockData);
expect(state.isLoading).toEqual(false);
});
it('sets designs array with design data', () => {
mutations[types.RECEIVE_DESIGNS_SUCCESS](state, mockData);
it('sets designs array with data', () => {
mutations[types.RECEIVE_REPLICABLE_ITEMS_SUCCESS](state, mockData);
expect(state.designs).toBe(mockData.data);
});
it('sets pageSize and totalDesigns', () => {
mutations[types.RECEIVE_DESIGNS_SUCCESS](state, mockData);
mutations[types.RECEIVE_REPLICABLE_ITEMS_SUCCESS](state, mockData);
expect(state.pageSize).toEqual(mockData.perPage);
expect(state.totalDesigns).toEqual(mockData.total);
});
});
describe('RECEIVE_DESIGNS_ERROR', () => {
describe('RECEIVE_REPLICABLE_ITEMS_ERROR', () => {
let mockData = {};
beforeEach(() => {
......@@ -98,14 +98,14 @@ describe('GeoDesigns Store Mutations', () => {
it('sets isLoading to false', () => {
state.isLoading = true;
mutations[types.RECEIVE_DESIGNS_ERROR](state);
mutations[types.RECEIVE_REPLICABLE_ITEMS_ERROR](state);
expect(state.isLoading).toEqual(false);
});
it('resets designs array', () => {
state.designs = mockData.data;
mutations[types.RECEIVE_DESIGNS_ERROR](state);
mutations[types.RECEIVE_REPLICABLE_ITEMS_ERROR](state);
expect(state.designs).toEqual([]);
});
......@@ -113,20 +113,20 @@ describe('GeoDesigns Store Mutations', () => {
state.pageSize = mockData.perPage;
state.totalDesigns = mockData.total;
mutations[types.RECEIVE_DESIGNS_ERROR](state);
mutations[types.RECEIVE_REPLICABLE_ITEMS_ERROR](state);
expect(state.pageSize).toEqual(0);
expect(state.totalDesigns).toEqual(0);
});
});
describe.each`
mutation | loadingBefore | loadingAfter
${types.REQUEST_INITIATE_ALL_DESIGN_SYNCS} | ${false} | ${true}
${types.RECEIVE_INITIATE_ALL_DESIGN_SYNCS_SUCCESS} | ${true} | ${false}
${types.RECEIVE_INITIATE_ALL_DESIGN_SYNCS_ERROR} | ${true} | ${false}
${types.REQUEST_INITIATE_DESIGN_SYNC} | ${false} | ${true}
${types.RECEIVE_INITIATE_DESIGN_SYNC_SUCCESS} | ${true} | ${false}
${types.RECEIVE_INITIATE_DESIGN_SYNC_ERROR} | ${true} | ${false}
mutation | loadingBefore | loadingAfter
${types.REQUEST_INITIATE_ALL_REPLICABLE_SYNCS} | ${false} | ${true}
${types.RECEIVE_INITIATE_ALL_REPLICABLE_SYNCS_SUCCESS} | ${true} | ${false}
${types.RECEIVE_INITIATE_ALL_REPLICABLE_SYNCS_ERROR} | ${true} | ${false}
${types.REQUEST_INITIATE_REPLICABLE_SYNC} | ${false} | ${true}
${types.RECEIVE_INITIATE_REPLICABLE_SYNC_SUCCESS} | ${true} | ${false}
${types.RECEIVE_INITIATE_REPLICABLE_SYNC_ERROR} | ${true} | ${false}
`(`Sync Mutations: `, ({ mutation, loadingBefore, loadingAfter }) => {
describe(`${mutation}`, () => {
it(`sets isLoading to ${loadingAfter}`, () => {
......
......@@ -19914,10 +19914,10 @@ msgstr ""
msgid "There was an error fetching median data for stages"
msgstr ""
msgid "There was an error fetching the Designs"
msgid "There was an error fetching the Node's Groups"
msgstr ""
msgid "There was an error fetching the Node's Groups"
msgid "There was an error fetching the designs"
msgstr ""
msgid "There was an error fetching the environments information."
......@@ -19962,7 +19962,7 @@ msgstr ""
msgid "There was an error subscribing to this label."
msgstr ""
msgid "There was an error syncing the Design Repositories."
msgid "There was an error syncing the designs."
msgstr ""
msgid "There was an error trying to validate your query"
......
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