Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-08-04 21:10:05 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-08-04 21:10:05 +0300
commit43fb9e32f29817020267b13616c6670512fc5eab (patch)
tree4d9a800bbd959fe1bc6225c211343e560174256b /spec/features/protected_tags_spec.rb
parentd984d4a092018d86eec724a06ce2e6c066c3fb44 (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.rb13
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