diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-18 13:50:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-18 13:50:51 +0300 |
commit | db384e6b19af03b4c3c82a5760d83a3fd79f7982 (patch) | |
tree | 34beaef37df5f47ccbcf5729d7583aae093cffa0 /spec/features/protected_tags_spec.rb | |
parent | 54fd7b1bad233e3944434da91d257fa7f63c3996 (diff) |
Add latest changes from gitlab-org/gitlab@16-3-stable-eev16.3.0-rc42
Diffstat (limited to 'spec/features/protected_tags_spec.rb')
-rw-r--r-- | spec/features/protected_tags_spec.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/features/protected_tags_spec.rb b/spec/features/protected_tags_spec.rb index 45315f53fd6..f5b463d63fa 100644 --- a/spec/features/protected_tags_spec.rb +++ b/spec/features/protected_tags_spec.rb @@ -15,6 +15,8 @@ RSpec.describe 'Protected Tags', :js, :with_license, feature_category: :source_c describe "explicit protected tags" do it "allows creating explicit protected tags" do visit project_protected_tags_path(project) + click_button('Add tag') + set_protected_tag_name('some-tag') set_allowed_to('create') click_on_protect @@ -29,6 +31,7 @@ RSpec.describe 'Protected Tags', :js, :with_license, feature_category: :source_c project.repository.add_tag(user, 'some-tag', commit.id) visit project_protected_tags_path(project) + click_button('Add tag') set_protected_tag_name('some-tag') set_allowed_to('create') click_on_protect @@ -38,6 +41,7 @@ RSpec.describe 'Protected Tags', :js, :with_license, feature_category: :source_c it "displays an error message if the named tag does not exist" do visit project_protected_tags_path(project) + click_button('Add tag') set_protected_tag_name('some-tag') set_allowed_to('create') click_on_protect @@ -49,6 +53,7 @@ RSpec.describe 'Protected Tags', :js, :with_license, feature_category: :source_c describe "wildcard protected tags" do it "allows creating protected tags with a wildcard" do visit project_protected_tags_path(project) + click_button('Add tag') set_protected_tag_name('*-stable') set_allowed_to('create') click_on_protect @@ -63,12 +68,16 @@ RSpec.describe 'Protected Tags', :js, :with_license, feature_category: :source_c project.repository.add_tag(user, 'staging-stable', 'master') visit project_protected_tags_path(project) + click_button('Add tag') set_protected_tag_name('*-stable') set_allowed_to('create') click_on_protect + within("#js-protected-tags-settings .gl-new-card-count") do + expect(page).to have_content("2") + end + within(".protected-tags-list") do - expect(page).to have_content("Protected tags (2)") expect(page).to have_content("2 matching tags") end end @@ -79,11 +88,13 @@ RSpec.describe 'Protected Tags', :js, :with_license, feature_category: :source_c project.repository.add_tag(user, 'development', 'master') visit project_protected_tags_path(project) + click_button('Add tag') set_protected_tag_name('*-stable') set_allowed_to('create') click_on_protect visit project_protected_tags_path(project) + click_button('Add tag') click_on "2 matching tags" within(".protected-tags-list") do |