Skip to content

Commit 049df7a

Browse files
add timeouts
1 parent 571240b commit 049df7a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Page } from '@playwright/test';
1+
import { expect, Page } from '@playwright/test';
22

33
export class MockUkBankAccountsPage {
44
page: Page;
@@ -8,11 +8,13 @@ export class MockUkBankAccountsPage {
88
}
99

1010
// Locators
11+
currentAccount = () => this.page.getByText('Select account');
1112
continueButton = () => this.page.getByRole('button', { name: 'Continue' });
1213

1314
// Methods
1415
async selectAccountAndContinue() {
15-
await this.continueButton().isVisible({timeout:10000});
16+
await expect(this.currentAccount()).toBeVisible({ timeout: 10000 })
17+
await this.continueButton().isVisible();
1618
await this.continueButton().click({force: true});
1719
}
1820
}

tests/e2e/pages/payment-confirmation-page.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class PaymentConfirmationPage {
1414

1515
// Methods
1616
async waitForProcessingAndContinue() {
17-
await expect(this.paymentProcessingText().or(this.paymentConfirmedText())).toBeVisible({timeout: 15000})
17+
await expect(this.paymentProcessingText().or(this.paymentConfirmedText())).toBeVisible({timeout: 20000})
1818
await expect(this.continueButton()).toBeVisible();
1919
await this.continueButton().click();
2020
}

0 commit comments

Comments
 (0)