Commit 0dafeaf7 authored by Bryce Johnson's avatar Bryce Johnson

Add spec for Turn on Service Desk.

parent 4bc2687b
require 'spec_helper'
describe 'Service Desk Issue Tracker' do
describe 'Service Desk Issue Tracker', js: true do
let(:project) { create(:project, :private, service_desk_enabled: true) }
let(:user) { create(:user) }
......@@ -15,20 +15,23 @@ describe 'Service Desk Issue Tracker' do
describe 'navigation to service desk' do
before do
visit project_path(project)
find('.nav-links .shortcuts-issues').trigger('click')
find('.sidebar-top-level-items .shortcuts-issues').trigger('click')
find('a[title="Service Desk"]').trigger('click')
end
it 'can navigate to the service desk from link in the sidebar', js: true do
it 'can navigate to the service desk from link in the sidebar' do
expect(page).to have_content('Use Service Desk to connect with your users')
end
end
describe 'issues list', js: true do
describe 'issues list' do
context 'when service desk has not been activated' do
let(:project_without_service_desk) { create(:project, :private, service_desk_enabled: false) }
describe 'service desk info content' do
before do
visit service_desk_project_issues_path(project)
project_without_service_desk.add_master(user)
visit service_desk_project_issues_path(project_without_service_desk)
end
it 'displays the large info box' do
......@@ -38,6 +41,10 @@ describe 'Service Desk Issue Tracker' do
it 'has a link to the documentation' do
expect(page).to have_link('Read more', href: help_page_path('user/project/service_desk'))
end
it 'does show a button configure service desk' do
expect(page).to have_link('Turn on Service Desk')
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment