Skip to content

Commit

Permalink
Fix GH Action test: data-bs-dismiss modal close
Browse files Browse the repository at this point in the history
`execute_script('arguments[0].click();', modal_close_button)` works locally, however, the modal seems to be failing to close when the test is run as a GitHub Action.
  -  Strangely `execute_script('arguments[0].click();', modal_close_button)` works as a GitHub Action when executed for the 'Modal search opens and closes and allows user to search, select and remove items' test within this same file.
  • Loading branch information
aaronskiba committed Feb 13, 2025
1 parent 527c347 commit 8a7d832
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/features/modal_search_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
fill_in 'research_output_search_term', with: @model.name
click_button 'Apply filter(s)'
click_link 'Select'
modal_close_button = find('.modal-header button.btn-close')
execute_script('arguments[0].click();', modal_close_button)
# (execute_script('arguments[0].click();', modal_close_button) works locally here, but not as GitHub Action)
find('[data-bs-dismiss="modal"]').click
end

click_button 'Save'
Expand Down

0 comments on commit 8a7d832

Please sign in to comment.