summaryrefslogtreecommitdiff
path: root/spec/features/issues
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/issues')
-rw-r--r--spec/features/issues/note_polling_spec.rb16
1 files changed, 4 insertions, 12 deletions
diff --git a/spec/features/issues/note_polling_spec.rb b/spec/features/issues/note_polling_spec.rb
index 184cde5b9c5..ebc1e1d0bbe 100644
--- a/spec/features/issues/note_polling_spec.rb
+++ b/spec/features/issues/note_polling_spec.rb
@@ -13,7 +13,8 @@ feature 'Issue notes polling', :feature, :js do
it 'displays the new comment' do
note = create(:note, noteable: issue, project: project, note: 'Looks good!')
- page.execute_script('notes.refresh();')
+ page.execute_script('issueNotes.refresh();')
+ wait_for_requests
expect(page).to have_selector("#note_#{note.id}", text: 'Looks good!')
end
@@ -31,16 +32,6 @@ feature 'Issue notes polling', :feature, :js do
visit project_issue_path(project, issue)
end
- it 'has .original-note-content to compare against' do
- expect(page).to have_selector("#note_#{existing_note.id}", text: note_text)
- expect(page).to have_selector("#note_#{existing_note.id} .original-note-content", count: 1, visible: false)
-
- update_note(existing_note, updated_text)
-
- expect(page).to have_selector("#note_#{existing_note.id}", text: updated_text)
- expect(page).to have_selector("#note_#{existing_note.id} .original-note-content", count: 1, visible: false)
- end
-
it 'displays the updated content' do
expect(page).to have_selector("#note_#{existing_note.id}", text: note_text)
@@ -127,7 +118,8 @@ feature 'Issue notes polling', :feature, :js do
def update_note(note, new_text)
note.update(note: new_text)
- page.execute_script('notes.refresh();')
+ page.execute_script('issueNotes.refresh();')
+ wait_for_requests
end
def click_edit_action(note)