Commit 671556c6 authored by Nick Thomas's avatar Nick Thomas

Fix a failing spec in diff_notes_resolve_spec.rb

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