summaryrefslogtreecommitdiff
path: root/spec/features/issues/note_polling_spec.rb
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2017-07-17 20:12:55 +0300
committerFatih Acet <acetfatih@gmail.com>2017-07-21 22:35:26 +0300
commit3c946b932b60ffa58245a091b58108396e5b6546 (patch)
treef40e42e46c0497c80db6d318fcef68d59b983a0a /spec/features/issues/note_polling_spec.rb
parent72dfc763b47dc63bd43170c0439869d97635fe7b (diff)
downloadgitlab-ce-3c946b932b60ffa58245a091b58108396e5b6546.tar.gz
IssueNotesRefactor: Fix Rspec tests.
Diffstat (limited to 'spec/features/issues/note_polling_spec.rb')
-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)