diff options
Diffstat (limited to 'spec/frontend/ci/ci_variable_list/components/ci_variable_modal_spec.js')
-rw-r--r-- | spec/frontend/ci/ci_variable_list/components/ci_variable_modal_spec.js | 41 |
1 files changed, 1 insertions, 40 deletions
diff --git a/spec/frontend/ci/ci_variable_list/components/ci_variable_modal_spec.js b/spec/frontend/ci/ci_variable_list/components/ci_variable_modal_spec.js index 7dce23f72c0..5ba9b3b8c20 100644 --- a/spec/frontend/ci/ci_variable_list/components/ci_variable_modal_spec.js +++ b/spec/frontend/ci/ci_variable_list/components/ci_variable_modal_spec.js @@ -12,12 +12,10 @@ import { ENVIRONMENT_SCOPE_LINK_TITLE, AWS_TIP_TITLE, AWS_TIP_MESSAGE, - groupString, instanceString, - projectString, variableOptions, } from '~/ci/ci_variable_list/constants'; -import { mockEnvs, mockVariablesWithScopes, mockVariablesWithUniqueScopes } from '../mocks'; +import { mockVariablesWithScopes } from '../mocks'; import ModalStub from '../stubs'; describe('Ci variable modal', () => { @@ -46,7 +44,6 @@ describe('Ci variable modal', () => { areScopedVariablesAvailable: true, environments: [], hideEnvironmentScope: false, - hasEnvScopeQuery: false, mode: ADD_VARIABLE_ACTION, selectedVariable: {}, variables: [], @@ -352,42 +349,6 @@ describe('Ci variable modal', () => { expect(link.attributes('title')).toBe(ENVIRONMENT_SCOPE_LINK_TITLE); expect(link.attributes('href')).toBe(defaultProvide.environmentScopeLink); }); - - describe('when query for envioronment scope exists', () => { - beforeEach(() => { - createComponent({ - props: { - environments: mockEnvs, - hasEnvScopeQuery: true, - variables: mockVariablesWithUniqueScopes(projectString), - }, - }); - }); - - it('does not merge environment scope sources', () => { - const expectedLength = mockEnvs.length; - - expect(findCiEnvironmentsDropdown().props('environments')).toHaveLength(expectedLength); - }); - }); - - describe('when feature flag is disabled', () => { - const mockGroupVariables = mockVariablesWithUniqueScopes(groupString); - beforeEach(() => { - createComponent({ - props: { - environments: mockEnvs, - variables: mockGroupVariables, - }, - }); - }); - - it('merges environment scope sources', () => { - const expectedLength = mockGroupVariables.length + mockEnvs.length; - - expect(findCiEnvironmentsDropdown().props('environments')).toHaveLength(expectedLength); - }); - }); }); describe('and section is hidden', () => { |