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:
authorFilipa Lacerda <filipa@gitlab.com>2017-08-13 01:57:41 +0300
committerFilipa Lacerda <filipa@gitlab.com>2017-08-13 01:57:41 +0300
commit8345f2e67f5137e94ecf50f49a17d94102776537 (patch)
tree2ea1ba26ea2205af71a2ec8eba13cb6211934847 /spec/features/issues/note_polling_spec.rb
parent60adf5a93a2c7232f514e42abbd15b324d948111 (diff)
Fix note polling specs with the new behavior of not updating an external updated note being edited
Diffstat (limited to 'spec/features/issues/note_polling_spec.rb')
-rw-r--r--spec/features/issues/note_polling_spec.rb21
1 files changed, 5 insertions, 16 deletions
diff --git a/spec/features/issues/note_polling_spec.rb b/spec/features/issues/note_polling_spec.rb
index b2f5c7e62a6..2503aecdc23 100644
--- a/spec/features/issues/note_polling_spec.rb
+++ b/spec/features/issues/note_polling_spec.rb
@@ -39,33 +39,22 @@ feature 'Issue notes polling', :js do
expect(page).to have_selector("#note_#{existing_note.id}", text: updated_text)
end
- it 'when editing but have not changed anything, and an update comes in, show the updated content in the textarea' do
+ it 'when editing but have not changed anything, and an update comes in, show warning and does not update the note' do
click_edit_action(existing_note)
- expect(page).to have_field("note-body", with: note_text)
+ expect(page).to have_field("note[note]", with: note_text)
update_note(existing_note, 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-body", with: note_text)
-
- find("#note_#{existing_note.id} .js-note-text").set('something random')
- update_note(existing_note, updated_text)
-
+ expect(page).not_to have_field("note[note]", with: updated_text)
expect(page).to have_selector(".alert")
end
+
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-body", with: note_text)
-
- find("#note_#{existing_note.id} .js-note-text").set('something random')
+ expect(page).to have_field("note[note]", with: note_text)
update_note(existing_note, updated_text)