Skip to content

Commit

Permalink
FI-1432 feat: support waitings before retries
Browse files Browse the repository at this point in the history
  • Loading branch information
uid11 committed Oct 23, 2024
1 parent a833611 commit f31beaa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/Page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ export abstract class Page<PageParams = undefined> {
* Asserts that we are on the expected page by `isMatch` flage.
* `isMatch` equals `true`, if url matches the page with given parameters, and `false` otherwise.
*/
assertPage(isMatch: boolean): AsyncVoid {
assertPage(isMatch: boolean, documentUrl: Url): AsyncVoid {
assertValueIsTrue(isMatch, `the document url matches the page "${this.constructor.name}"`, {
documentUrl,
page: this,
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/actions/pages/assertPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const assertPage = async <SomePageClass extends AnyPageClassType>(
LogEventType.InternalAction,
);

await page.assertPage(isMatch);
await page.assertPage(isMatch, documentUrl);

await page.afterAssertPage?.();

Expand Down
2 changes: 1 addition & 1 deletion src/actions/pages/navigateToPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const navigateToPage = async <SomePageClass extends AnyPageClassType>(
const documentUrl = await getDocumentUrl();
const isMatch = route.isMatchUrl(documentUrl);

await page.assertPage(isMatch);
await page.assertPage(isMatch, documentUrl);

await page.afterAssertPage?.();

Expand Down

0 comments on commit f31beaa

Please sign in to comment.