Trigger notes refresh in specs instead of waiting for ajax
This commit is contained in:
parent
6fb120d1b0
commit
8fe821cfa5
|
@ -10,7 +10,7 @@ feature 'Issue notes polling' do
|
||||||
|
|
||||||
scenario 'Another user adds a comment to an issue', js: true do
|
scenario 'Another user adds a comment to an issue', js: true do
|
||||||
note = create(:note_on_issue, noteable: issue, note: 'Looks good!')
|
note = create(:note_on_issue, noteable: issue, note: 'Looks good!')
|
||||||
sleep 15 # refresh interval in notes.js.coffee is 15 seconds
|
page.execute_script('notes.refresh();')
|
||||||
expect(page).to have_selector("#note_#{note.id}", text: 'Looks good!')
|
expect(page).to have_selector("#note_#{note.id}", text: 'Looks good!')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue