diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-17 12:09:32 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-17 12:09:32 +0300 |
commit | afed1a4be18c74f8b95a0b8e0e359a1339ca1ad1 (patch) | |
tree | 108265d8da2c5856183f9032c16dd9ae63cf9b01 /spec/frontend/integrations | |
parent | 9e3e71602cac2593f77282b1862fbd163e78233f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/integrations')
4 files changed, 18 insertions, 18 deletions
diff --git a/spec/frontend/integrations/edit/components/integration_form_spec.js b/spec/frontend/integrations/edit/components/integration_form_spec.js index fccb56f4597..eeb5d21d62c 100644 --- a/spec/frontend/integrations/edit/components/integration_form_spec.js +++ b/spec/frontend/integrations/edit/components/integration_form_spec.js @@ -137,13 +137,13 @@ describe('IntegrationForm', () => { }); }); - describe('adminState state is null', () => { + describe('defaultState state is null', () => { it('does not render OverrideDropdown', () => { createComponent( {}, {}, { - adminState: null, + defaultState: null, }, ); @@ -151,13 +151,13 @@ describe('IntegrationForm', () => { }); }); - describe('adminState state is an object', () => { + describe('defaultState state is an object', () => { it('renders OverrideDropdown', () => { createComponent( {}, {}, { - adminState: { + defaultState: { ...mockIntegrationProps, }, }, diff --git a/spec/frontend/integrations/edit/components/override_dropdown_spec.js b/spec/frontend/integrations/edit/components/override_dropdown_spec.js index 44e14cb3760..f312c456d5f 100644 --- a/spec/frontend/integrations/edit/components/override_dropdown_spec.js +++ b/spec/frontend/integrations/edit/components/override_dropdown_spec.js @@ -13,15 +13,15 @@ describe('OverrideDropdown', () => { override: true, }; - const defaultAdminStateProps = { + const defaultDefaultStateProps = { integrationLevel: 'group', }; - const createComponent = (props = {}, adminStateProps = {}) => { + const createComponent = (props = {}, defaultStateProps = {}) => { wrapper = shallowMount(OverrideDropdown, { propsData: { ...defaultProps, ...props }, store: createStore({ - adminState: { ...defaultAdminStateProps, ...adminStateProps }, + defaultState: { ...defaultDefaultStateProps, ...defaultStateProps }, }), }); }; diff --git a/spec/frontend/integrations/edit/store/getters_spec.js b/spec/frontend/integrations/edit/store/getters_spec.js index 700d36edaad..3353e0c84cc 100644 --- a/spec/frontend/integrations/edit/store/getters_spec.js +++ b/spec/frontend/integrations/edit/store/getters_spec.js @@ -5,22 +5,22 @@ import { mockIntegrationProps } from '../mock_data'; describe('Integration form store getters', () => { let state; const customState = { ...mockIntegrationProps, type: 'CustomState' }; - const adminState = { ...mockIntegrationProps, type: 'AdminState' }; + const defaultState = { ...mockIntegrationProps, type: 'DefaultState' }; beforeEach(() => { state = createState({ customState }); }); describe('isInheriting', () => { - describe('when adminState is null', () => { + describe('when defaultState is null', () => { it('returns false', () => { expect(isInheriting(state)).toBe(false); }); }); - describe('when adminState is an object', () => { + describe('when defaultState is an object', () => { beforeEach(() => { - state.adminState = adminState; + state.defaultState = defaultState; }); describe('when override is false', () => { @@ -47,11 +47,11 @@ describe('Integration form store getters', () => { describe('propsSource', () => { beforeEach(() => { - state.adminState = adminState; + state.defaultState = defaultState; }); - it('equals adminState if inheriting', () => { - expect(propsSource(state, { isInheriting: true })).toEqual(adminState); + it('equals defaultState if inheriting', () => { + expect(propsSource(state, { isInheriting: true })).toEqual(defaultState); }); it('equals customState if not inheriting', () => { diff --git a/spec/frontend/integrations/edit/store/state_spec.js b/spec/frontend/integrations/edit/store/state_spec.js index 2518e5c7b93..fc193850a94 100644 --- a/spec/frontend/integrations/edit/store/state_spec.js +++ b/spec/frontend/integrations/edit/store/state_spec.js @@ -3,7 +3,7 @@ import createState from '~/integrations/edit/store/state'; describe('Integration form state factory', () => { it('states default to null', () => { expect(createState()).toEqual({ - adminState: null, + defaultState: null, customState: {}, isSaving: false, isTesting: false, @@ -19,9 +19,9 @@ describe('Integration form state factory', () => { [null, { inheritFromId: null }, false], [null, { inheritFromId: 25 }, false], ])( - 'for adminState: %p, customState: %p: override = `%p`', - (adminState, customState, expected) => { - expect(createState({ adminState, customState }).override).toEqual(expected); + 'for defaultState: %p, customState: %p: override = `%p`', + (defaultState, customState, expected) => { + expect(createState({ defaultState, customState }).override).toEqual(expected); }, ); }); |