Skip to content

Commit 8a7d832

Browse files
committed
Fix GH Action test: data-bs-dismiss modal close
`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.
1 parent 527c347 commit 8a7d832

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec/features/modal_search_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@
6161
fill_in 'research_output_search_term', with: @model.name
6262
click_button 'Apply filter(s)'
6363
click_link 'Select'
64-
modal_close_button = find('.modal-header button.btn-close')
65-
execute_script('arguments[0].click();', modal_close_button)
64+
# (execute_script('arguments[0].click();', modal_close_button) works locally here, but not as GitHub Action)
65+
find('[data-bs-dismiss="modal"]').click
6666
end
6767

6868
click_button 'Save'

0 commit comments

Comments
 (0)