DEV: Attempt to fix flaky test by using `click_button` instead of `click` (#25070)

Why this change?

Some of the tests in `spec/system/table_builder_spec.rb` are flaky when
we are asserting that clicking the cancel button will close the modal.
This change attempts to fix it by using the `click_button` method
instead of `find` then `click` which is more reliable.
This commit is contained in:
Alan Guo Xiang Tan 2023-12-29 14:39:37 +08:00 committed by GitHub
parent 0756486b65
commit 2b3a572987
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ module PageObjects
end
def cancel
find("#{MODAL_SELECTOR} .d-modal-cancel").click
click_button(I18n.t("js.cancel"))
end
def click_edit_reason