diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-27 03:08:53 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-27 03:08:53 +0300 |
commit | 7ace0e99be20db28a517b9d464cb3363d26766c9 (patch) | |
tree | 60088fb49a104450a6f865a3eb8dcae22792fd1e /spec/frontend/pipeline_new | |
parent | dafbc31897e3751b6a4b34a7e32e1ecf5bfd4657 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/pipeline_new')
-rw-r--r-- | spec/frontend/pipeline_new/components/pipeline_new_form_spec.js | 41 |
1 files changed, 14 insertions, 27 deletions
diff --git a/spec/frontend/pipeline_new/components/pipeline_new_form_spec.js b/spec/frontend/pipeline_new/components/pipeline_new_form_spec.js index 421ad9f4939..904226708fe 100644 --- a/spec/frontend/pipeline_new/components/pipeline_new_form_spec.js +++ b/spec/frontend/pipeline_new/components/pipeline_new_form_spec.js @@ -225,42 +225,29 @@ describe('Pipeline New Form', () => { }); }); - describe('when feature flag new_pipeline_form_prefilled_vars is enabled', () => { - let origGon; - + describe('when yml defines a variable', () => { const mockYmlKey = 'yml_var'; const mockYmlValue = 'yml_var_val'; const mockYmlDesc = 'A var from yml.'; - beforeAll(() => { - origGon = window.gon; - window.gon = { features: { newPipelineFormPrefilledVars: true } }; - }); - - afterAll(() => { - window.gon = origGon; - }); - - describe('loading state', () => { - it('loading icon is shown when content is requested and hidden when received', async () => { - createComponent('', mockParams, mount); + it('loading icon is shown when content is requested and hidden when received', async () => { + createComponent('', mockParams, mount); - mock.onGet(configVariablesPath).reply(httpStatusCodes.OK, { - [mockYmlKey]: { - value: mockYmlValue, - description: mockYmlDesc, - }, - }); + mock.onGet(configVariablesPath).reply(httpStatusCodes.OK, { + [mockYmlKey]: { + value: mockYmlValue, + description: mockYmlDesc, + }, + }); - expect(findLoadingIcon().exists()).toBe(true); + expect(findLoadingIcon().exists()).toBe(true); - await waitForPromises(); + await waitForPromises(); - expect(findLoadingIcon().exists()).toBe(false); - }); + expect(findLoadingIcon().exists()).toBe(false); }); - describe('when yml defines a variable with description', () => { + describe('with description', () => { beforeEach(async () => { createComponent('', mockParams, mount); @@ -302,7 +289,7 @@ describe('Pipeline New Form', () => { }); }); - describe('when yml defines a variable without description', () => { + describe('without description', () => { beforeEach(async () => { createComponent('', mockParams, mount); |