Commit 3712f642 authored by Alfredo Sumaran's avatar Alfredo Sumaran

Merge branch 'fix-time-tracking-tests' into 'multiple_assignees_review'

Fix time tracking tests

See merge request !1775
parents f2f7ef9d 35326d62
...@@ -34,7 +34,7 @@ shared_examples 'issuable time tracker' do ...@@ -34,7 +34,7 @@ shared_examples 'issuable time tracker' do
submit_time('/estimate 3w 1d 1h') submit_time('/estimate 3w 1d 1h')
submit_time('/remove_estimate') submit_time('/remove_estimate')
page.within '#issuable-time-tracker' do page.within '.time-tracking-component-wrap' do
expect(page).to have_content 'No estimate or time spent' expect(page).to have_content 'No estimate or time spent'
end end
end end
...@@ -43,13 +43,13 @@ shared_examples 'issuable time tracker' do ...@@ -43,13 +43,13 @@ shared_examples 'issuable time tracker' do
submit_time('/spend 3w 1d 1h') submit_time('/spend 3w 1d 1h')
submit_time('/remove_time_spent') submit_time('/remove_time_spent')
page.within '#issuable-time-tracker' do page.within '.time-tracking-component-wrap' do
expect(page).to have_content 'No estimate or time spent' expect(page).to have_content 'No estimate or time spent'
end end
end end
it 'shows the help state when icon is clicked' do it 'shows the help state when icon is clicked' do
page.within '#issuable-time-tracker' do page.within '.time-tracking-component-wrap' do
find('.help-button').click find('.help-button').click
expect(page).to have_content 'Track time with slash commands' expect(page).to have_content 'Track time with slash commands'
expect(page).to have_content 'Learn more' expect(page).to have_content 'Learn more'
...@@ -57,7 +57,7 @@ shared_examples 'issuable time tracker' do ...@@ -57,7 +57,7 @@ shared_examples 'issuable time tracker' do
end end
it 'hides the help state when close icon is clicked' do it 'hides the help state when close icon is clicked' do
page.within '#issuable-time-tracker' do page.within '.time-tracking-component-wrap' do
find('.help-button').click find('.help-button').click
find('.close-help-button').click find('.close-help-button').click
...@@ -67,7 +67,7 @@ shared_examples 'issuable time tracker' do ...@@ -67,7 +67,7 @@ shared_examples 'issuable time tracker' do
end end
it 'displays the correct help url' do it 'displays the correct help url' do
page.within '#issuable-time-tracker' do page.within '.time-tracking-component-wrap' do
find('.help-button').click find('.help-button').click
expect(find_link('Learn more')[:href]).to have_content('/help/workflow/time_tracking.md') expect(find_link('Learn more')[:href]).to have_content('/help/workflow/time_tracking.md')
......
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