diff --git a/tests/e2e/pages/mock-uk-bank-accounts-page.ts b/tests/e2e/pages/mock-uk-bank-accounts-page.ts index 45fa99c..8e9e4ec 100644 --- a/tests/e2e/pages/mock-uk-bank-accounts-page.ts +++ b/tests/e2e/pages/mock-uk-bank-accounts-page.ts @@ -1,4 +1,4 @@ -import { Page } from '@playwright/test'; +import { expect, Page } from '@playwright/test'; export class MockUkBankAccountsPage { page: Page; @@ -8,11 +8,13 @@ export class MockUkBankAccountsPage { } // Locators + currentAccount = () => this.page.getByText('Select account'); continueButton = () => this.page.getByRole('button', { name: 'Continue' }); // Methods async selectAccountAndContinue() { - await this.continueButton().isVisible({timeout:10000}); + await expect(this.currentAccount()).toBeVisible({ timeout: 10000 }) + await this.continueButton().isVisible(); await this.continueButton().click({force: true}); } } \ No newline at end of file diff --git a/tests/e2e/pages/payment-confirmation-page.ts b/tests/e2e/pages/payment-confirmation-page.ts index 3689c87..63b583e 100644 --- a/tests/e2e/pages/payment-confirmation-page.ts +++ b/tests/e2e/pages/payment-confirmation-page.ts @@ -14,7 +14,7 @@ export class PaymentConfirmationPage { // Methods async waitForProcessingAndContinue() { - await expect(this.paymentProcessingText().or(this.paymentConfirmedText())).toBeVisible({timeout: 15000}) + await expect(this.paymentProcessingText().or(this.paymentConfirmedText())).toBeVisible({timeout: 20000}) await expect(this.continueButton()).toBeVisible(); await this.continueButton().click(); }