diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-24 00:10:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-24 00:10:24 +0300 |
commit | 5838993b5f3e2d861d9dd7c82dfeea71506b9fc2 (patch) | |
tree | caab6621fb79f06a355f802dc885982f746b544d /spec/frontend/ci_variable_list | |
parent | b8d021cb606ac86f41a0ef9dacd133a9677f8414 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/ci_variable_list')
4 files changed, 17 insertions, 17 deletions
diff --git a/spec/frontend/ci_variable_list/components/ci_environments_dropdown_spec.js b/spec/frontend/ci_variable_list/components/ci_environments_dropdown_spec.js index 7bcd558c60f..faa88394447 100644 --- a/spec/frontend/ci_variable_list/components/ci_environments_dropdown_spec.js +++ b/spec/frontend/ci_variable_list/components/ci_environments_dropdown_spec.js @@ -10,7 +10,7 @@ describe('Ci environments dropdown', () => { let wrapper; let store; - const createComponent = term => { + const createComponent = (term) => { store = new Vuex.Store({ getters: { joinedEnvironments: () => ['dev', 'prod', 'staging'], @@ -27,8 +27,8 @@ describe('Ci environments dropdown', () => { }; const findAllDropdownItems = () => wrapper.findAll(GlDropdownItem); - const findDropdownItemByIndex = index => wrapper.findAll(GlDropdownItem).at(index); - const findActiveIconByIndex = index => findDropdownItemByIndex(index).find(GlIcon); + const findDropdownItemByIndex = (index) => wrapper.findAll(GlDropdownItem).at(index); + const findActiveIconByIndex = (index) => findDropdownItemByIndex(index).find(GlIcon); afterEach(() => { wrapper.destroy(); @@ -78,7 +78,7 @@ describe('Ci environments dropdown', () => { }); it('should not display create button', () => { - const environments = findAllDropdownItems().filter(env => env.text().startsWith('Create')); + const environments = findAllDropdownItems().filter((env) => env.text().startsWith('Create')); expect(environments).toHaveLength(0); expect(findAllDropdownItems()).toHaveLength(1); }); diff --git a/spec/frontend/ci_variable_list/components/ci_variable_modal_spec.js b/spec/frontend/ci_variable_list/components/ci_variable_modal_spec.js index 5c2d096418d..c57ff3ef20a 100644 --- a/spec/frontend/ci_variable_list/components/ci_variable_modal_spec.js +++ b/spec/frontend/ci_variable_list/components/ci_variable_modal_spec.js @@ -31,11 +31,11 @@ describe('Ci variable modal', () => { const findAddorUpdateButton = () => findModal() .findAll(GlButton) - .wrappers.find(button => button.props('variant') === 'success'); + .wrappers.find((button) => button.props('variant') === 'success'); const deleteVariableButton = () => findModal() .findAll(GlButton) - .wrappers.find(button => button.props('variant') === 'danger'); + .wrappers.find((button) => button.props('variant') === 'danger'); afterEach(() => { wrapper.destroy(); diff --git a/spec/frontend/ci_variable_list/components/ci_variable_settings_spec.js b/spec/frontend/ci_variable_list/components/ci_variable_settings_spec.js index 7dcd82eac5e..12449fc7615 100644 --- a/spec/frontend/ci_variable_list/components/ci_variable_settings_spec.js +++ b/spec/frontend/ci_variable_list/components/ci_variable_settings_spec.js @@ -11,7 +11,7 @@ describe('Ci variable table', () => { let store; let isGroup; - const createComponent = groupState => { + const createComponent = (groupState) => { store = createStore(); store.state.isGroup = groupState; jest.spyOn(store, 'dispatch').mockImplementation(); diff --git a/spec/frontend/ci_variable_list/store/actions_spec.js b/spec/frontend/ci_variable_list/store/actions_spec.js index 4b89e467df0..075e5829305 100644 --- a/spec/frontend/ci_variable_list/store/actions_spec.js +++ b/spec/frontend/ci_variable_list/store/actions_spec.js @@ -86,7 +86,7 @@ describe('CI variable list store actions', () => { }); describe('deleteVariable', () => { - it('dispatch correct actions on successful deleted variable', done => { + it('dispatch correct actions on successful deleted variable', (done) => { mock.onPatch(state.endpoint).reply(200); testAction( @@ -105,7 +105,7 @@ describe('CI variable list store actions', () => { ); }); - it('should show flash error and set error in state on delete failure', done => { + it('should show flash error and set error in state on delete failure', (done) => { mock.onPatch(state.endpoint).reply(500, ''); testAction( @@ -129,7 +129,7 @@ describe('CI variable list store actions', () => { }); describe('updateVariable', () => { - it('dispatch correct actions on successful updated variable', done => { + it('dispatch correct actions on successful updated variable', (done) => { mock.onPatch(state.endpoint).reply(200); testAction( @@ -148,7 +148,7 @@ describe('CI variable list store actions', () => { ); }); - it('should show flash error and set error in state on update failure', done => { + it('should show flash error and set error in state on update failure', (done) => { mock.onPatch(state.endpoint).reply(500, ''); testAction( @@ -172,7 +172,7 @@ describe('CI variable list store actions', () => { }); describe('addVariable', () => { - it('dispatch correct actions on successful added variable', done => { + it('dispatch correct actions on successful added variable', (done) => { mock.onPatch(state.endpoint).reply(200); testAction( @@ -191,7 +191,7 @@ describe('CI variable list store actions', () => { ); }); - it('should show flash error and set error in state on add failure', done => { + it('should show flash error and set error in state on add failure', (done) => { mock.onPatch(state.endpoint).reply(500, ''); testAction( @@ -215,7 +215,7 @@ describe('CI variable list store actions', () => { }); describe('fetchVariables', () => { - it('dispatch correct actions on fetchVariables', done => { + it('dispatch correct actions on fetchVariables', (done) => { mock.onGet(state.endpoint).reply(200, { variables: mockData.mockVariables }); testAction( @@ -236,7 +236,7 @@ describe('CI variable list store actions', () => { ); }); - it('should show flash error and set error in state on fetch variables failure', done => { + it('should show flash error and set error in state on fetch variables failure', (done) => { mock.onGet(state.endpoint).reply(500); testAction(actions.fetchVariables, {}, state, [], [{ type: 'requestVariables' }], () => { @@ -247,7 +247,7 @@ describe('CI variable list store actions', () => { }); describe('fetchEnvironments', () => { - it('dispatch correct actions on fetchEnvironments', done => { + it('dispatch correct actions on fetchEnvironments', (done) => { Api.environments = jest.fn().mockResolvedValue({ data: mockData.mockEnvironments }); testAction( @@ -268,7 +268,7 @@ describe('CI variable list store actions', () => { ); }); - it('should show flash error and set error in state on fetch environments failure', done => { + it('should show flash error and set error in state on fetch environments failure', (done) => { Api.environments = jest.fn().mockRejectedValue(); testAction( |