Commit 69be5f5c authored by Bryce Johnson's avatar Bryce Johnson

Properly scope visit calls after resource creation, remove unneeded spec.

parent 6ae5e01b
......@@ -25,12 +25,12 @@ describe 'Service Desk Issue Tracker' do
end
describe 'issues list', js: true do
before do
visit service_desk_project_issues_path(project)
end
context 'when service desk has not been activated' do
describe 'service desk info content' do
before do
visit service_desk_project_issues_path(project)
end
it 'displays the large info box' do
expect(page).to have_css('.empty-state')
end
......@@ -38,10 +38,6 @@ 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 'shows a button to configure service desk' do
expect(page).to have_link('Turn on Service Desk')
end
end
end
......@@ -53,6 +49,10 @@ describe 'Service Desk Issue Tracker' do
context 'when there are no issues' do
describe 'service desk info content' do
before do
visit service_desk_project_issues_path(project)
end
it 'displays the large info box' do
expect(page).to have_css('.empty-state')
end
......@@ -78,6 +78,10 @@ describe 'Service Desk Issue Tracker' do
let!(:other_user_issue) { create(:issue, project: project, author: other_user) }
describe 'service desk info content' do
before do
visit service_desk_project_issues_path(project)
end
it 'displays the small info box' do
expect(page).to have_css('.non-empty-state')
end
......@@ -96,12 +100,20 @@ describe 'Service Desk Issue Tracker' do
end
describe 'issues list' do
before do
visit service_desk_project_issues_path(project)
end
it 'only displays issues created by support bot' do
expect(page).to have_selector('.issues-list .issue', count: 1)
end
end
describe 'search box' do
before do
visit service_desk_project_issues_path(project)
end
it 'displays the support bot author token' do
author_token = find('.filtered-search-token .value')
expect(author_token).to have_content('Support Bot')
......
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