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:
Diffstat (limited to 'spec/features/merge_request/user_posts_notes_spec.rb')
-rw-r--r--spec/features/merge_request/user_posts_notes_spec.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/spec/features/merge_request/user_posts_notes_spec.rb b/spec/features/merge_request/user_posts_notes_spec.rb
index 0416474218f..1779567624c 100644
--- a/spec/features/merge_request/user_posts_notes_spec.rb
+++ b/spec/features/merge_request/user_posts_notes_spec.rb
@@ -133,7 +133,7 @@ RSpec.describe 'Merge request > User posts notes', :js do
describe 'when previewing a note' do
it 'shows the toolbar buttons when editing a note' do
page.within('.js-main-target-form') do
- expect(page).to have_css('.md-header-toolbar.active')
+ expect(page).to have_css('.md-header-toolbar')
end
end
@@ -141,7 +141,7 @@ RSpec.describe 'Merge request > User posts notes', :js do
wait_for_requests
find('.js-md-preview-button').click
page.within('.js-main-target-form') do
- expect(page).not_to have_css('.md-header-toolbar.active')
+ expect(page).not_to have_css('.md-header-toolbar')
end
end
end
@@ -165,11 +165,13 @@ RSpec.describe 'Merge request > User posts notes', :js do
it 'resets the edit note form textarea with the original content of the note if cancelled' do
within('.current-note-edit-form') do
fill_in 'note[note]', with: 'Some new content'
+ find('[data-testid="cancel"]').click
+ end
- accept_confirm do
- find('[data-testid="cancel"]').click
- end
+ page.within('.modal') do
+ click_button('OK', match: :first)
end
+
expect(find('.js-note-text').text).to eq ''
end