diff options
author | Sean McGivern <sean@gitlab.com> | 2019-04-04 10:30:09 +0000 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2019-04-04 10:30:09 +0000 |
commit | e9699cd930a487ec01cd7d6485a42cd1a2b62945 (patch) | |
tree | 98684623f749eefa16c3d77ba38d83c46fbc7cac /spec/support | |
parent | b57fe50cce38391a2d27785c9abe667ce789b7d1 (diff) | |
parent | b87b4d75b3da1deef9c9ba219a570dab339976d7 (diff) | |
download | gitlab-ce-e9699cd930a487ec01cd7d6485a42cd1a2b62945.tar.gz |
Merge branch '59570-tag-quick-action' into 'master'
Move tag quick action spec to shared example
Closes #59570
See merge request gitlab-org/gitlab-ce!26904
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/shared_examples/quick_actions/commit/tag_quick_action_shared_examples.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/support/shared_examples/quick_actions/commit/tag_quick_action_shared_examples.rb b/spec/support/shared_examples/quick_actions/commit/tag_quick_action_shared_examples.rb index 4604d867507..b337a1c18d8 100644 --- a/spec/support/shared_examples/quick_actions/commit/tag_quick_action_shared_examples.rb +++ b/spec/support/shared_examples/quick_actions/commit/tag_quick_action_shared_examples.rb @@ -1,4 +1,28 @@ # frozen_string_literal: true shared_examples 'tag quick action' do + context "post note to existing commit" do + it 'tags this commit' do + add_note("/tag #{tag_name} #{tag_message}") + + expect(page).to have_content 'Commands applied' + expect(page).to have_content "tagged commit #{truncated_commit_sha}" + expect(page).to have_content tag_name + + visit project_tag_path(project, tag_name) + expect(page).to have_content tag_name + expect(page).to have_content tag_message + expect(page).to have_content truncated_commit_sha + end + end + + context 'preview', :js do + it 'removes quick action from note and explains it' do + preview_note("/tag #{tag_name} #{tag_message}") + + expect(page).not_to have_content '/tag' + expect(page).to have_content %{Tags this commit to #{tag_name} with "#{tag_message}"} + expect(page).to have_content tag_name + end + end end |