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:
authorOswaldo Ferreira <oswaldo@gitlab.com>2019-04-24 21:17:46 +0300
committerOswaldo Ferreira <oswaldo@gitlab.com>2019-04-25 19:06:06 +0300
commit8f59ea33e7d3dceb63bc5953a5b27d5968536287 (patch)
tree3475f7fe585faa0b5149a566e0596846d7fe9279 /spec/support/protected_tag_helpers.rb
parentc719bc4966bb5eb402ef4b8c03b869eccc430c6d (diff)
Extract EE specific tests for protected branches/tags
We have the spec files containing EE specific code for spec/features/protected_branches_spec.rb and spec/features/protected_tags_spec.rb. This commit deletes / extracts the CE part of it.
Diffstat (limited to 'spec/support/protected_tag_helpers.rb')
-rw-r--r--spec/support/protected_tag_helpers.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/support/protected_tag_helpers.rb b/spec/support/protected_tag_helpers.rb
new file mode 100644
index 00000000000..fe9be856286
--- /dev/null
+++ b/spec/support/protected_tag_helpers.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+require_relative 'protected_branch_helpers'
+
+module ProtectedTagHelpers
+ include ::ProtectedBranchHelpers
+
+ def set_allowed_to(operation, option = 'Maintainers', form: '.new-protected-tag')
+ super
+ end
+
+ def set_protected_tag_name(tag_name)
+ find('.js-protected-tag-select').click
+ find('.dropdown-input-field').set(tag_name)
+ click_on("Create wildcard #{tag_name}")
+ find('.protected-tags-dropdown .dropdown-menu', visible: false)
+ end
+end