diff options
Diffstat (limited to 'spec/features/groups/settings')
-rw-r--r-- | spec/features/groups/settings/packages_and_registries_spec.rb | 22 | ||||
-rw-r--r-- | spec/features/groups/settings/user_searches_in_settings_spec.rb | 2 |
2 files changed, 11 insertions, 13 deletions
diff --git a/spec/features/groups/settings/packages_and_registries_spec.rb b/spec/features/groups/settings/packages_and_registries_spec.rb index d3141da9160..98dc534f54e 100644 --- a/spec/features/groups/settings/packages_and_registries_spec.rb +++ b/spec/features/groups/settings/packages_and_registries_spec.rb @@ -15,7 +15,7 @@ RSpec.describe 'Group Packages & Registries settings' do sign_in(user) end - context 'when packges feature is disabled on the group' do + context 'when packages feature is disabled on the group' do before do stub_packages_setting(enabled: false) end @@ -56,26 +56,26 @@ RSpec.describe 'Group Packages & Registries settings' do expect(sidebar).to have_link _('Packages & Registries') end - it 'has a Package Registry section', :js do + it 'has a Duplicate packages section', :js do visit_settings_page - expect(page).to have_content('Package Registry') - expect(page).to have_button('Collapse') + expect(page).to have_content('Duplicate packages') end it 'automatically saves changes to the server', :js do visit_settings_page within '[data-testid="maven-settings"]' do - expect(page).to have_content('Allow duplicates') + expect(page).to have_content('Reject packages with the same name and version') + expect(page).not_to have_content('Exceptions') find('.gl-toggle').click - expect(page).to have_content('Do not allow duplicates') + expect(page).to have_content('Exceptions') visit_settings_page - expect(page).to have_content('Do not allow duplicates') + expect(page).to have_content('Exceptions') end end @@ -83,12 +83,10 @@ RSpec.describe 'Group Packages & Registries settings' do visit_settings_page within '[data-testid="maven-settings"]' do - expect(page).to have_content('Allow duplicates') + expect(page).to have_content('Reject packages with the same name and version') find('.gl-toggle').click - expect(page).to have_content('Do not allow duplicates') - fill_in 'Exceptions', with: ')' # simulate blur event @@ -103,11 +101,11 @@ RSpec.describe 'Group Packages & Registries settings' do visit_sub_group_settings_page within '[data-testid="maven-settings"]' do - expect(page).to have_content('Allow duplicates') + expect(page).to have_content('Reject packages with the same name and version') find('.gl-toggle').click - expect(page).to have_content('Do not allow duplicates') + expect(page).to have_content('Exceptions') end end end diff --git a/spec/features/groups/settings/user_searches_in_settings_spec.rb b/spec/features/groups/settings/user_searches_in_settings_spec.rb index c7b7b25caa7..998c3d2ca3f 100644 --- a/spec/features/groups/settings/user_searches_in_settings_spec.rb +++ b/spec/features/groups/settings/user_searches_in_settings_spec.rb @@ -48,6 +48,6 @@ RSpec.describe 'User searches group settings', :js do visit group_settings_packages_and_registries_path(group) end - it_behaves_like 'can highlight results', 'Use GitLab as a private registry' + it_behaves_like 'can highlight results', 'Allow packages with the same name and version' end end |