Fix a failing spec in diff_notes_resolve_spec.rb

This commit is contained in:
Nick Thomas 2016-10-27 17:58:32 +01:00
parent 20a7db4483
commit 671556c611

View file

@ -194,12 +194,12 @@ feature 'Diff notes resolve', feature: true, js: true do
context 'multiple notes' do
before do
create(:diff_note_on_merge_request, project: project, noteable: merge_request)
visit_merge_request
end
it 'does not mark discussion as resolved when resolving single note' do
page.within '.diff-content .note' do
page.first '.diff-content .note' do
first('.line-resolve-btn').click
sleep 1
expect(first('.line-resolve-btn')['data-original-title']).to eq("Resolved by #{user.name}")
end
@ -212,7 +212,9 @@ feature 'Diff notes resolve', feature: true, js: true do
it 'resolves discussion' do
page.all('.note').each do |note|
note.find('.line-resolve-btn').click
note.all('.line-resolve-btn').each do |button|
button.click
end
end
expect(page).to have_content('Resolved by')
@ -292,7 +294,7 @@ feature 'Diff notes resolve', feature: true, js: true do
expect(holder).to have_selector('.discussion-next-btn')
end
end
it 'displays next discussion even if hidden' do
page.all('.note-discussion').each do |discussion|
page.within discussion do