diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-04 21:10:05 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-04 21:10:05 +0300 |
commit | 43fb9e32f29817020267b13616c6670512fc5eab (patch) | |
tree | 4d9a800bbd959fe1bc6225c211343e560174256b /spec/features/protected_tags_spec.rb | |
parent | d984d4a092018d86eec724a06ce2e6c066c3fb44 (diff) |
Add latest changes from gitlab-org/gitlab@master
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 |