Skip to content

Commit

Permalink
fix: vipps wait for locator to be visible and add time for timeout af…
Browse files Browse the repository at this point in the history
…ter redirect
  • Loading branch information
zenit2001 committed Nov 17, 2023
1 parent 0dd5535 commit 053b2eb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/playwright/pages/CheckoutPageSFRA5.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export default class CheckoutPageSFRA5 {
expectSuccess = async () => {
await this.page.waitForNavigation({
url: /Order-Confirm/,
timeout: 15000,
timeout: 20000,
});
await expect(this.thankYouMessage).toBeVisible({ timeout: 15000 });
};
Expand Down
2 changes: 1 addition & 1 deletion tests/playwright/pages/CheckoutPageSFRA6.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export default class CheckoutPageSFRA {
expectSuccess = async () => {
await this.page.waitForNavigation({
url: /Order-Confirm/,
timeout: 15000,
timeout: 20000,
});
await expect(this.thankYouMessage).toBeVisible({ timeout: 15000 });
};
Expand Down
3 changes: 2 additions & 1 deletion tests/playwright/pages/PaymentMethodsPage.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default class PaymentMethodsPage {
}

getLocation = async () => {
await this.page.waitForNavigation('load', { timeout: 15000 });
await this.page.waitForNavigation('load', { timeout: 20000 });
return await this.page.url();
};

Expand Down Expand Up @@ -505,6 +505,7 @@ export default class PaymentMethodsPage {
};

cancelVippsPayment = async () => {
await expect(this.page.locator('.cancel-link')).toBeVisible({ timeout: 15000 });
await this.page.click('.cancel-link');
};

Expand Down

0 comments on commit 053b2eb

Please sign in to comment.