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

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

39 lines
904 B
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2019-12-04 20:38:33 +05:30
require 'spec_helper'
2018-03-17 18:26:18 +05:30
2023-03-04 22:38:38 +05:30
RSpec.describe 'Issues shortcut', :js, feature_category: :team_planning do
2018-03-17 18:26:18 +05:30
context 'New Issue shortcut' do
context 'issues are enabled' do
let(:project) { create(:project) }
before do
2022-04-04 11:22:00 +05:30
sign_in(project.first_owner)
2018-03-17 18:26:18 +05:30
visit project_path(project)
end
it 'takes user to the new issue page' do
find('body').native.send_keys('i')
expect(page).to have_selector('#new_issue')
end
end
context 'issues are not enabled' do
let(:project) { create(:project, :issues_disabled) }
before do
2022-04-04 11:22:00 +05:30
sign_in(project.first_owner)
2018-03-17 18:26:18 +05:30
visit project_path(project)
end
it 'does not take user to the new issue page' do
find('body').native.send_keys('i')
expect(page).to have_selector("body[data-page='projects:show']")
end
end
end
end