mirror of
https://github.com/we-promise/sure.git
synced 2026-07-11 20:35:17 +00:00
PropertyTest#open_account_edit_dialog already retried the menu→Edit flow
because the account page issues a Turbo morph refresh shortly after load
(turbo_refreshes_with :morph). But the naive retry had two gaps that can
still flake under a slow CI browser:
- It re-clicked the DS::Menu trigger every iteration. The trigger toggles
(menu_controller#toggle), so a retry after a slow-but-successful modal
load would close the open menu and hide "Edit". Now it opens the menu
only when it is closed.
- It did not tolerate the menu node detaching mid-click ("Node with given
id does not belong to the document"), an inspector error Capybara does
not auto-retry. Now it rescues the transient detach/stale errors and
retries, re-raising anything else.
Mirrors the same guard applied to AccountsTest#open_account_edit_dialog.