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:
authorPeter Leitzen <pl@neopoly.de>2018-07-21 11:05:57 +0300
committerPeter Leitzen <pl@neopoly.de>2018-08-10 17:45:11 +0300
commit4779c43ef9c2c3d534effdbacf3af910ed3e3c3e (patch)
tree19b18da1c864d7086b24569a04e1544a601d7362 /spec/features/commits
parent9964b678110e97c492a8b2f77ab899252c05f10e (diff)
Create a feature spec for "/tag"
Diffstat (limited to 'spec/features/commits')
-rw-r--r--spec/features/commits/user_uses_slash_commands_spec.rb36
1 files changed, 36 insertions, 0 deletions
diff --git a/spec/features/commits/user_uses_slash_commands_spec.rb b/spec/features/commits/user_uses_slash_commands_spec.rb
new file mode 100644
index 00000000000..f356155be61
--- /dev/null
+++ b/spec/features/commits/user_uses_slash_commands_spec.rb
@@ -0,0 +1,36 @@
+require 'rails_helper'
+
+describe 'Commit > User uses quick actions', :js do
+ include Spec::Support::Helpers::Features::NotesHelpers
+ include RepoHelpers
+
+ let(:project) { create(:project, :public, :repository) }
+ let(:user) { project.creator }
+ let(:commit) { project.commit }
+
+ before do
+ project.add_maintainer(user)
+ sign_in(user)
+
+ visit project_commit_path(project, commit.id)
+ end
+
+ describe 'Tagging a commit' do
+ let(:tag_name) { 'v1.2.3' }
+ let(:tag_message) { 'Stable release' }
+ let(:truncated_commit_sha) { Commit.truncate_sha(commit.sha) }
+
+ 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
+end