diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 16:16:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 16:16:36 +0300 |
commit | 311b0269b4eb9839fa63f80c8d7a58f32b8138a0 (patch) | |
tree | 07e7870bca8aed6d61fdcc810731c50d2c40af47 /spec/features/projects/new_project_spec.rb | |
parent | 27909cef6c4170ed9205afa7426b8d3de47cbb0c (diff) |
Add latest changes from gitlab-org/gitlab@14-5-stable-eev14.5.0-rc42
Diffstat (limited to 'spec/features/projects/new_project_spec.rb')
-rw-r--r-- | spec/features/projects/new_project_spec.rb | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/spec/features/projects/new_project_spec.rb b/spec/features/projects/new_project_spec.rb index dacbaa826a0..4dedd5689de 100644 --- a/spec/features/projects/new_project_spec.rb +++ b/spec/features/projects/new_project_spec.rb @@ -23,7 +23,7 @@ RSpec.describe 'New project', :js do ) visit new_project_path - find('[data-qa-panel-name="blank_project"]').click # rubocop:disable QA/SelectorUsage + click_link 'Create blank project' expect(page).to have_content 'Other visibility settings have been disabled by the administrator.' end @@ -34,7 +34,7 @@ RSpec.describe 'New project', :js do ) visit new_project_path - find('[data-qa-panel-name="blank_project"]').click # rubocop:disable QA/SelectorUsage + click_link 'Create blank project' expect(page).to have_content 'Visibility settings have been disabled by the administrator.' end @@ -49,14 +49,14 @@ RSpec.describe 'New project', :js do it 'shows "New project" page', :js do visit new_project_path - find('[data-qa-panel-name="blank_project"]').click # rubocop:disable QA/SelectorUsage + click_link 'Create blank project' expect(page).to have_content('Project name') expect(page).to have_content('Project URL') expect(page).to have_content('Project slug') click_link('New project') - find('[data-qa-panel-name="import_project"]').click # rubocop:disable QA/SelectorUsage + click_link 'Import project' expect(page).to have_link('GitHub') expect(page).to have_link('Bitbucket') @@ -69,7 +69,7 @@ RSpec.describe 'New project', :js do before do visit new_project_path - find('[data-qa-panel-name="import_project"]').click # rubocop:disable QA/SelectorUsage + click_link 'Import project' end it 'has Manifest file' do @@ -83,7 +83,7 @@ RSpec.describe 'New project', :js do stub_application_setting(default_project_visibility: level) visit new_project_path - find('[data-qa-panel-name="blank_project"]').click # rubocop:disable QA/SelectorUsage + click_link 'Create blank project' page.within('#blank-project-pane') do expect(find_field("project_visibility_level_#{level}")).to be_checked end @@ -91,7 +91,7 @@ RSpec.describe 'New project', :js do it "saves visibility level #{level} on validation error" do visit new_project_path - find('[data-qa-panel-name="blank_project"]').click # rubocop:disable QA/SelectorUsage + click_link 'Create blank project' choose(key) click_button('Create project') @@ -111,7 +111,7 @@ RSpec.describe 'New project', :js do context 'when admin mode is enabled', :enable_admin_mode do it 'has private selected' do visit new_project_path(namespace_id: group.id) - find('[data-qa-panel-name="blank_project"]').click # rubocop:disable QA/SelectorUsage + click_link 'Create blank project' page.within('#blank-project-pane') do expect(find_field("project_visibility_level_#{Gitlab::VisibilityLevel::PRIVATE}")).to be_checked @@ -138,7 +138,7 @@ RSpec.describe 'New project', :js do context 'when admin mode is enabled', :enable_admin_mode do it 'has private selected' do visit new_project_path(namespace_id: group.id, project: { visibility_level: Gitlab::VisibilityLevel::PRIVATE }) - find('[data-qa-panel-name="blank_project"]').click # rubocop:disable QA/SelectorUsage + click_link 'Create blank project' page.within('#blank-project-pane') do expect(find_field("project_visibility_level_#{Gitlab::VisibilityLevel::PRIVATE}")).to be_checked @@ -159,7 +159,7 @@ RSpec.describe 'New project', :js do context 'Readme selector' do it 'shows the initialize with Readme checkbox on "Blank project" tab' do visit new_project_path - find('[data-qa-panel-name="blank_project"]').click # rubocop:disable QA/SelectorUsage + click_link 'Create blank project' expect(page).to have_css('input#project_initialize_with_readme') expect(page).to have_content('Initialize repository with a README') @@ -167,7 +167,7 @@ RSpec.describe 'New project', :js do it 'does not show the initialize with Readme checkbox on "Create from template" tab' do visit new_project_path - find('[data-qa-panel-name="create_from_template"]').click # rubocop:disable QA/SelectorUsage + click_link 'Create from template' first('.choose-template').click page.within '.project-fields-form' do @@ -178,7 +178,7 @@ RSpec.describe 'New project', :js do it 'does not show the initialize with Readme checkbox on "Import project" tab' do visit new_project_path - find('[data-qa-panel-name="import_project"]').click # rubocop:disable QA/SelectorUsage + click_link 'Import project' first('.js-import-git-toggle-button').click page.within '#import-project-pane' do @@ -192,7 +192,7 @@ RSpec.describe 'New project', :js do context 'with user namespace' do before do visit new_project_path - find('[data-qa-panel-name="blank_project"]').click # rubocop:disable QA/SelectorUsage + click_link 'Create blank project' end it 'selects the user namespace' do @@ -208,7 +208,7 @@ RSpec.describe 'New project', :js do before do group.add_owner(user) visit new_project_path(namespace_id: group.id) - find('[data-qa-panel-name="blank_project"]').click # rubocop:disable QA/SelectorUsage + click_link 'Create blank project' end it 'selects the group namespace' do @@ -225,7 +225,7 @@ RSpec.describe 'New project', :js do before do group.add_maintainer(user) visit new_project_path(namespace_id: subgroup.id) - find('[data-qa-panel-name="blank_project"]').click # rubocop:disable QA/SelectorUsage + click_link 'Create blank project' end it 'selects the group namespace' do @@ -245,7 +245,7 @@ RSpec.describe 'New project', :js do internal_group.add_owner(user) private_group.add_owner(user) visit new_project_path(namespace_id: public_group.id) - find('[data-qa-panel-name="blank_project"]').click # rubocop:disable QA/SelectorUsage + click_link 'Create blank project' end it 'enables the correct visibility options' do @@ -275,7 +275,7 @@ RSpec.describe 'New project', :js do context 'Import project options', :js do before do visit new_project_path - find('[data-qa-panel-name="import_project"]').click # rubocop:disable QA/SelectorUsage + click_link 'Import project' end context 'from git repository url, "Repo by URL"' do @@ -351,7 +351,7 @@ RSpec.describe 'New project', :js do before do group.add_developer(user) visit new_project_path(namespace_id: group.id) - find('[data-qa-panel-name="blank_project"]').click # rubocop:disable QA/SelectorUsage + click_link 'Create blank project' end it 'selects the group namespace' do |