diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2019-04-24 15:17:46 -0300 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2019-04-25 13:06:06 -0300 |
commit | 8f59ea33e7d3dceb63bc5953a5b27d5968536287 (patch) | |
tree | 3475f7fe585faa0b5149a566e0596846d7fe9279 /spec/support/protected_tag_helpers.rb | |
parent | c719bc4966bb5eb402ef4b8c03b869eccc430c6d (diff) | |
download | gitlab-ce-8f59ea33e7d3dceb63bc5953a5b27d5968536287.tar.gz |
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.rb | 18 |
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 |