debian-mirror-gitlab/spec/features/issues/user_uses_quick_actions_spec.rb

69 lines
2.7 KiB
Ruby
Raw Normal View History

2019-07-31 22:56:46 +05:30
# frozen_string_literal: true
2016-09-13 17:45:13 +05:30
require 'rails_helper'
2018-11-08 19:23:39 +05:30
describe 'Issues > User uses quick actions', :js do
2018-05-09 12:01:36 +05:30
include Spec::Support::Helpers::Features::NotesHelpers
2016-09-13 17:45:13 +05:30
2019-07-07 11:18:12 +05:30
context "issuable common quick actions" do
let(:new_url_opts) { {} }
let(:maintainer) { create(:user) }
let(:project) { create(:project, :public) }
let!(:label_bug) { create(:label, project: project, title: 'bug') }
let!(:label_feature) { create(:label, project: project, title: 'feature') }
let!(:milestone) { create(:milestone, project: project, title: 'ASAP') }
2016-09-13 17:45:13 +05:30
let(:issuable) { create(:issue, project: project) }
2019-07-07 11:18:12 +05:30
let(:source_issuable) { create(:issue, project: project, milestone: milestone, labels: [label_bug, label_feature])}
it_behaves_like 'assign quick action', :issue
it_behaves_like 'unassign quick action', :issue
it_behaves_like 'close quick action', :issue
it_behaves_like 'reopen quick action', :issue
it_behaves_like 'title quick action', :issue
it_behaves_like 'todo quick action', :issue
it_behaves_like 'done quick action', :issue
it_behaves_like 'subscribe quick action', :issue
it_behaves_like 'unsubscribe quick action', :issue
it_behaves_like 'lock quick action', :issue
it_behaves_like 'unlock quick action', :issue
it_behaves_like 'milestone quick action', :issue
it_behaves_like 'remove_milestone quick action', :issue
it_behaves_like 'label quick action', :issue
it_behaves_like 'unlabel quick action', :issue
it_behaves_like 'relabel quick action', :issue
it_behaves_like 'award quick action', :issue
it_behaves_like 'estimate quick action', :issue
it_behaves_like 'remove_estimate quick action', :issue
it_behaves_like 'spend quick action', :issue
it_behaves_like 'remove_time_spent quick action', :issue
it_behaves_like 'shrug quick action', :issue
it_behaves_like 'tableflip quick action', :issue
it_behaves_like 'copy_metadata quick action', :issue
it_behaves_like 'issuable time tracker', :issue
2016-09-13 17:45:13 +05:30
end
describe 'issue-only commands' do
let(:user) { create(:user) }
2019-07-31 22:56:46 +05:30
let(:project) { create(:project, :public, :repository) }
2019-07-07 11:18:12 +05:30
let(:issue) { create(:issue, project: project, due_date: Date.new(2016, 8, 28)) }
2016-09-13 17:45:13 +05:30
before do
2018-11-18 11:00:15 +05:30
project.add_maintainer(user)
2017-09-10 17:25:29 +05:30
sign_in(user)
visit project_issue_path(project, issue)
2019-07-07 11:18:12 +05:30
wait_for_all_requests
2016-09-13 17:45:13 +05:30
end
2016-09-29 09:46:39 +05:30
after do
2017-09-10 17:25:29 +05:30
wait_for_requests
end
2019-07-07 11:18:12 +05:30
it_behaves_like 'confidential quick action'
it_behaves_like 'remove_due_date quick action'
it_behaves_like 'duplicate quick action'
2019-07-31 22:56:46 +05:30
it_behaves_like 'create_merge_request quick action'
it_behaves_like 'due quick action'
it_behaves_like 'move quick action'
2016-09-13 17:45:13 +05:30
end
end