diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-08-12 23:57:41 +0100 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-08-12 23:57:41 +0100 |
commit | 8345f2e67f5137e94ecf50f49a17d94102776537 (patch) | |
tree | 2ea1ba26ea2205af71a2ec8eba13cb6211934847 /spec | |
parent | 60adf5a93a2c7232f514e42abbd15b324d948111 (diff) | |
download | gitlab-ce-8345f2e67f5137e94ecf50f49a17d94102776537.tar.gz |
Fix note polling specs with the new behavior of not updating an external updated note being edited
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/issues/note_polling_spec.rb | 21 |
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) |