Commit 03b56af0 authored by Bryce Johnson's avatar Bryce Johnson

Add MR integration tests.

parent 0e60cbf1
...@@ -100,6 +100,33 @@ feature 'Issues > User uses slash commands', feature: true, js: true do ...@@ -100,6 +100,33 @@ feature 'Issues > User uses slash commands', feature: true, js: true do
end end
end end
describe 'Issuable time tracking', focus: true, js: true do
before do
project.team << [user, :developer]
end
context 'Issue' do
let(:issue) { create(:issue, project: project) }
before do
visit namespace_project_issue_path(project.namespace, project, issue)
end
it_behaves_like 'issuable time tracker'
end
context 'Merge Request' do
let(:issue) { create(:issue, project: project) }
let(:merge_request) { create(:merge_request, source_project: project) }
before do
visit namespace_project_merge_request_path(project.namespace, project, merge_request)
end
it_behaves_like 'issuable time tracker'
end
end
describe 'toggling the WIP prefix from the title from note' do describe 'toggling the WIP prefix from the title from note' do
let(:issue) { create(:issue, project: project) } let(:issue) { create(:issue, project: project) }
......
...@@ -55,6 +55,16 @@ shared_examples 'issuable time tracker' do ...@@ -55,6 +55,16 @@ shared_examples 'issuable time tracker' do
expect(page).to have_content 'Learn more' expect(page).to have_content 'Learn more'
end end
end end
it 'hides the help state when close icon is clicked' do
page.within '#issuable-time-tracker' do
find('.help-button').click
find('.close-help-button').click
expect(page).not_to have_content 'Track time with slash commands'
expect(page).not_to have_content 'Learn more'
end
end
end end
def submit_time(slash_command) def submit_time(slash_command)
......
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