2016-06-30 15:34:19 +00:00
|
|
|
require 'rails_helper'
|
|
|
|
|
|
|
|
feature 'Merge Requests > User uses slash commands', feature: true, js: true do
|
2016-09-08 22:51:35 +00:00
|
|
|
include SlashCommandsHelpers
|
2016-06-30 15:34:19 +00:00
|
|
|
include WaitForAjax
|
|
|
|
|
|
|
|
let(:user) { create(:user) }
|
|
|
|
let(:project) { create(:project, :public) }
|
|
|
|
let(:merge_request) { create(:merge_request, source_project: project) }
|
|
|
|
let!(:milestone) { create(:milestone, project: project, title: 'ASAP') }
|
|
|
|
|
|
|
|
it_behaves_like 'issuable record that supports slash commands in its description and notes', :merge_request do
|
|
|
|
let(:issuable) { create(:merge_request, source_project: project) }
|
|
|
|
let(:new_url_opts) { { merge_request: { source_branch: 'feature' } } }
|
|
|
|
end
|
|
|
|
|
|
|
|
describe 'adding a due date from note' do
|
|
|
|
before do
|
|
|
|
project.team << [user, :master]
|
|
|
|
login_with(user)
|
|
|
|
visit namespace_project_merge_request_path(project.namespace, project, merge_request)
|
|
|
|
end
|
|
|
|
|
2016-09-08 22:51:35 +00:00
|
|
|
after do
|
|
|
|
wait_for_ajax
|
|
|
|
end
|
|
|
|
|
2016-06-30 15:34:19 +00:00
|
|
|
it 'does not recognize the command nor create a note' do
|
2016-09-08 22:51:35 +00:00
|
|
|
write_note("/due 2016-08-28")
|
2016-06-30 15:34:19 +00:00
|
|
|
|
2016-08-17 23:58:52 +00:00
|
|
|
expect(page).not_to have_content '/due 2016-08-28'
|
2016-06-30 15:34:19 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|