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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.9 KiB
Ruby
Raw Normal View History

2019-07-31 22:56:46 +05:30
# frozen_string_literal: true
2019-12-04 20:38:33 +05:30
require 'spec_helper'
2016-09-13 17:45:13 +05:30
2019-09-30 21:07:59 +05:30
# These are written as feature specs because they cover more specific test scenarios
# than the ones described on spec/services/notes/create_service_spec.rb for quick actions,
# for example, adding quick actions when creating the issue and checking DateTime formats on UI.
# Because this kind of spec takes more time to run there is no need to add new ones
# for each existing quick action unless they test something not tested by existing tests.
2020-06-23 00:09:42 +05:30
RSpec.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 'close 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-31 22:56:46 +05:30
it_behaves_like 'create_merge_request quick action'
it_behaves_like 'move quick action'
2019-12-04 20:38:33 +05:30
it_behaves_like 'zoom quick actions'
2021-02-22 17:27:13 +05:30
it_behaves_like 'clone quick action'
2021-12-11 22:18:48 +05:30
it_behaves_like 'promote_to_incident quick action'
2016-09-13 17:45:13 +05:30
end
end