Fix Paypal login flakiness
This commit is contained in:
parent
bb56843114
commit
a8937d53f0
1 changed files with 8 additions and 3 deletions
|
|
@ -24,9 +24,14 @@ export class PaypalPage extends BasePage {
|
|||
}
|
||||
|
||||
async completePaypalPurchase(paymentDetails: IPaymentDetails) {
|
||||
await this.usernameTextBox.fill(paymentDetails.username!);
|
||||
await this.nextButton.waitFor({ state: 'visible', timeout: 10000 });
|
||||
await this.nextButton.click();
|
||||
|
||||
await expect(async () => {
|
||||
await this.usernameTextBox.fill(paymentDetails.username!);
|
||||
await this.nextButton.waitFor({ state: 'visible', timeout: 5000 });
|
||||
await this.nextButton.click();
|
||||
await expect(this.passwordTextBox).toBeVisible({ timeout: 5000 });
|
||||
}).toPass({ timeout: 30000 });
|
||||
|
||||
await this.passwordTextBox.fill(paymentDetails.password!);
|
||||
await this.paypalLoginButton.click();
|
||||
await this.payButton.click();
|
||||
|
|
|
|||
Loading…
Reference in a new issue