diff options
Diffstat (limited to 'spec/frontend/projects')
-rw-r--r-- | spec/frontend/projects/experiment_new_project_creation/components/app_spec.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/frontend/projects/experiment_new_project_creation/components/app_spec.js b/spec/frontend/projects/experiment_new_project_creation/components/app_spec.js index df1e38ec528..204e7a7c394 100644 --- a/spec/frontend/projects/experiment_new_project_creation/components/app_spec.js +++ b/spec/frontend/projects/experiment_new_project_creation/components/app_spec.js @@ -23,6 +23,7 @@ describe('Experimental new project creation app', () => { findWelcomePage() .props() .panels.find((p) => p.name === panelName); + const findPanelHeader = () => wrapper.find('h4'); describe('new_repo experiment', () => { describe('when in the candidate variant', () => { @@ -33,6 +34,17 @@ describe('Experimental new project creation app', () => { expect(findPanel('blank_project').title).toBe('Create blank project/repository'); }); + + describe('when hash is not empty on load', () => { + beforeEach(() => { + window.location.hash = '#blank_project'; + createComponent(); + }); + + it('renders "project/repository"', () => { + expect(findPanelHeader().text()).toBe('Create blank project/repository'); + }); + }); }); describe('when in the control variant', () => { @@ -43,6 +55,17 @@ describe('Experimental new project creation app', () => { expect(findPanel('blank_project').title).toBe('Create blank project'); }); + + describe('when hash is not empty on load', () => { + beforeEach(() => { + window.location.hash = '#blank_project'; + createComponent(); + }); + + it('renders "project"', () => { + expect(findPanelHeader().text()).toBe('Create blank project'); + }); + }); }); }); |