summaryrefslogtreecommitdiff
path: root/spec/features/issues/user_uses_slash_commands_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/issues/user_uses_slash_commands_spec.rb')
-rw-r--r--spec/features/issues/user_uses_slash_commands_spec.rb26
1 files changed, 13 insertions, 13 deletions
diff --git a/spec/features/issues/user_uses_slash_commands_spec.rb b/spec/features/issues/user_uses_slash_commands_spec.rb
index ea7a97d02a0..ff2a0e15719 100644
--- a/spec/features/issues/user_uses_slash_commands_spec.rb
+++ b/spec/features/issues/user_uses_slash_commands_spec.rb
@@ -1,7 +1,7 @@
require 'rails_helper'
feature 'Issues > User uses quick actions', :js do
- include QuickActionsHelpers
+ include Spec::Support::Helpers::Features::NotesHelpers
it_behaves_like 'issuable record that supports quick actions in its description and notes', :issue do
let(:issuable) { create(:issue, project: project) }
@@ -36,7 +36,7 @@ feature 'Issues > User uses quick actions', :js do
context 'when the current user can update the due date' do
it 'does not create a note, and sets the due date accordingly' do
- write_note("/due 2016-08-28")
+ add_note("/due 2016-08-28")
expect(page).not_to have_content '/due 2016-08-28'
expect(page).to have_content 'Commands applied'
@@ -57,7 +57,7 @@ feature 'Issues > User uses quick actions', :js do
end
it 'does not create a note, and sets the due date accordingly' do
- write_note("/due 2016-08-28")
+ add_note("/due 2016-08-28")
expect(page).not_to have_content 'Commands applied'
@@ -75,7 +75,7 @@ feature 'Issues > User uses quick actions', :js do
it 'does not create a note, and removes the due date accordingly' do
expect(issue.due_date).to eq Date.new(2016, 8, 28)
- write_note("/remove_due_date")
+ add_note("/remove_due_date")
expect(page).not_to have_content '/remove_due_date'
expect(page).to have_content 'Commands applied'
@@ -96,7 +96,7 @@ feature 'Issues > User uses quick actions', :js do
end
it 'does not create a note, and sets the due date accordingly' do
- write_note("/remove_due_date")
+ add_note("/remove_due_date")
expect(page).not_to have_content 'Commands applied'
@@ -111,7 +111,7 @@ feature 'Issues > User uses quick actions', :js do
let(:issue) { create(:issue, project: project) }
it 'does not recognize the command nor create a note' do
- write_note("/wip")
+ add_note("/wip")
expect(page).not_to have_content '/wip'
end
@@ -123,7 +123,7 @@ feature 'Issues > User uses quick actions', :js do
context 'when the current user can update issues' do
it 'does not create a note, and marks the issue as a duplicate' do
- write_note("/duplicate ##{original_issue.to_reference}")
+ add_note("/duplicate ##{original_issue.to_reference}")
expect(page).not_to have_content "/duplicate #{original_issue.to_reference}"
expect(page).to have_content 'Commands applied'
@@ -143,7 +143,7 @@ feature 'Issues > User uses quick actions', :js do
end
it 'does not create a note, and does not mark the issue as a duplicate' do
- write_note("/duplicate ##{original_issue.to_reference}")
+ add_note("/duplicate ##{original_issue.to_reference}")
expect(page).not_to have_content 'Commands applied'
expect(page).not_to have_content "marked this issue as a duplicate of #{original_issue.to_reference}"
@@ -166,7 +166,7 @@ feature 'Issues > User uses quick actions', :js do
end
it 'moves the issue' do
- write_note("/move #{target_project.full_path}")
+ add_note("/move #{target_project.full_path}")
expect(page).to have_content 'Commands applied'
expect(issue.reload).to be_closed
@@ -186,7 +186,7 @@ feature 'Issues > User uses quick actions', :js do
end
it 'does not move the issue' do
- write_note("/move #{project_unauthorized.full_path}")
+ add_note("/move #{project_unauthorized.full_path}")
expect(page).not_to have_content 'Commands applied'
expect(issue.reload).to be_open
@@ -200,7 +200,7 @@ feature 'Issues > User uses quick actions', :js do
end
it 'does not move the issue' do
- write_note("/move not/valid")
+ add_note("/move not/valid")
expect(page).not_to have_content 'Commands applied'
expect(issue.reload).to be_open
@@ -223,7 +223,7 @@ feature 'Issues > User uses quick actions', :js do
end
it 'applies the commands to both issues and moves the issue' do
- write_note("/label ~#{bug.title} ~#{wontfix.title}\n\n/milestone %\"#{milestone.title}\"\n\n/move #{target_project.full_path}")
+ add_note("/label ~#{bug.title} ~#{wontfix.title}\n\n/milestone %\"#{milestone.title}\"\n\n/move #{target_project.full_path}")
expect(page).to have_content 'Commands applied'
expect(issue.reload).to be_closed
@@ -242,7 +242,7 @@ feature 'Issues > User uses quick actions', :js do
end
it 'moves the issue and applies the commands to both issues' do
- write_note("/move #{target_project.full_path}\n\n/label ~#{bug.title} ~#{wontfix.title}\n\n/milestone %\"#{milestone.title}\"")
+ add_note("/move #{target_project.full_path}\n\n/label ~#{bug.title} ~#{wontfix.title}\n\n/milestone %\"#{milestone.title}\"")
expect(page).to have_content 'Commands applied'
expect(issue.reload).to be_closed