Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2017-07-18 01:08:00 +0300
committerFatih Acet <acetfatih@gmail.com>2017-07-21 22:35:26 +0300
commit44306f2662cdf8dcd43b123fb02cd5b099d29acf (patch)
tree8a117bf6fae6073bf210d92131a5bf072da27a28 /spec/features/issues/note_polling_spec.rb
parent397686df515eac5123c9fdc1abfdcce6b27601d1 (diff)
IssueNotesRefactor: Fix note polling specs.
Diffstat (limited to 'spec/features/issues/note_polling_spec.rb')
-rw-r--r--spec/features/issues/note_polling_spec.rb15
1 files changed, 6 insertions, 9 deletions
diff --git a/spec/features/issues/note_polling_spec.rb b/spec/features/issues/note_polling_spec.rb
index ebc1e1d0bbe..3471c49b3b9 100644
--- a/spec/features/issues/note_polling_spec.rb
+++ b/spec/features/issues/note_polling_spec.rb
@@ -43,17 +43,17 @@ feature 'Issue notes polling', :feature, :js do
it 'when editing but have not changed anything, and an update comes in, show the updated content in the textarea' do
click_edit_action(existing_note)
- expect(page).to have_field("note[note]", with: note_text)
+ expect(page).to have_field("note-body", with: note_text)
update_note(existing_note, updated_text)
- expect(page).to have_field("note[note]", with: updated_text)
+ expect(page).to have_field("note-body", with: updated_text)
end
it 'when editing but you changed some things, and an update comes in, show a warning' do
click_edit_action(existing_note)
- expect(page).to have_field("note[note]", with: note_text)
+ expect(page).to have_field("note-body", with: note_text)
find("#note_#{existing_note.id} .js-note-text").set('something random')
update_note(existing_note, updated_text)
@@ -64,7 +64,7 @@ feature 'Issue notes polling', :feature, :js do
it 'when editing but you changed some things, an update comes in, and you press cancel, show the updated content' do
click_edit_action(existing_note)
- expect(page).to have_field("note[note]", with: note_text)
+ expect(page).to have_field("note-body", with: note_text)
find("#note_#{existing_note.id} .js-note-text").set('something random')
@@ -88,14 +88,12 @@ feature 'Issue notes polling', :feature, :js do
visit project_issue_path(project, issue)
end
- it 'has .original-note-content to compare against' do
+ it 'displays the updated content' 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
end
@@ -109,9 +107,8 @@ feature 'Issue notes polling', :feature, :js do
visit project_issue_path(project, issue)
end
- it 'has .original-note-content to compare against' do
+ it 'shows the system note' do
expect(page).to have_selector("#note_#{system_note.id}", text: note_text)
- expect(page).to have_selector("#note_#{system_note.id} .original-note-content", count: 1, visible: false)
end
end
end