Commit 3dd1efe6 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'fix-flakes' into 'master'

fix transient dropdown test failures

Closes #37052 and #34436

See merge request !13862
parents 7ccef75a bcd2135e
...@@ -91,7 +91,7 @@ describe 'Comments on personal snippets', :js do ...@@ -91,7 +91,7 @@ describe 'Comments on personal snippets', :js do
context 'when editing a note' do context 'when editing a note' do
it 'changes the text' do it 'changes the text' do
find('.js-note-edit').click find('.js-note-edit').trigger('click')
page.within('.current-note-edit-form') do page.within('.current-note-edit-form') do
fill_in 'note[note]', with: 'new content' fill_in 'note[note]', with: 'new content'
......
...@@ -34,7 +34,7 @@ shared_examples 'reportable note' do ...@@ -34,7 +34,7 @@ shared_examples 'reportable note' do
end end
def open_dropdown(dropdown) def open_dropdown(dropdown)
dropdown.click dropdown.find('.more-actions-toggle').trigger('click')
dropdown.find('.dropdown-menu li', match: :first) dropdown.find('.dropdown-menu li', match: :first)
end end
end end
...@@ -2,7 +2,7 @@ module NoteInteractionHelpers ...@@ -2,7 +2,7 @@ module NoteInteractionHelpers
def open_more_actions_dropdown(note) def open_more_actions_dropdown(note)
note_element = find("#note_#{note.id}") note_element = find("#note_#{note.id}")
note_element.find('.more-actions').click note_element.find('.more-actions-toggle').trigger('click')
note_element.find('.more-actions .dropdown-menu li', match: :first) note_element.find('.more-actions .dropdown-menu li', match: :first)
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment