Skip to content

Commit

Permalink
Add tryAgainOnFail to flakey action
Browse files Browse the repository at this point in the history
  • Loading branch information
seadowg committed Mar 29, 2024
1 parent 6765b02 commit 487bf7c
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,16 @@ public FormEndPage assertOnPage() {
}

public <D extends Page<D>> D clickSaveAsDraft(D destination) {
clickOnString(org.odk.collect.strings.R.string.save_as_draft);
return destination.assertOnPage();
tryAgainOnFail(() -> {
clickOnString(org.odk.collect.strings.R.string.save_as_draft);
destination.assertOnPage();
});

return destination;
}

public MainMenuPage clickSaveAsDraft() {
clickOnString(org.odk.collect.strings.R.string.save_as_draft);
return new MainMenuPage().assertOnPage();
return clickSaveAsDraft(new MainMenuPage());
}

public <D extends Page<D>> D clickFinalize(D destination) {
Expand Down

0 comments on commit 487bf7c

Please sign in to comment.