Skip to content

Commit 7e1d6c0

Browse files
committed
Fix flaky spec delete_project_storage_and_file_links_spec.rb:67
failing spec: ./modules/storages/spec/features/delete_project_storage_and_file_links_spec.rb:67 failing run: https://github.com/opf/openproject/actions/runs/18154034691/job/51669959474 What I see when running the spec in headfull mode is that the `delete_confirmation` input field is filled by Capybara, and then immediately cleared out by "something". Of course the button is not enabled because the input field does not match the expected value, and so the test fails when it tries to click the button. I could not find what that something is, which would have helped synchronizing the test with it.Instead I added a 200ms sleep which seems to have fixed the issue.
1 parent 21766d6 commit 7e1d6c0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modules/storages/spec/features/delete_project_storage_and_file_links_spec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@
8686

8787
page.find(".icon.icon-delete").click
8888

89+
# wait for danger zone form to be somewhat "ready" (not sure why, but
90+
# without it the input field filled on next line may be cleared out due to a
91+
# race condition I do not understand)
92+
sleep(0.2)
93+
8994
# Approve Confirmation
9095
page.fill_in "delete_confirmation", with: storage.name
9196
page.click_button("Delete")

0 commit comments

Comments
 (0)