Fix pw order completion check

This commit is contained in:
Alex P 2023-05-29 17:14:27 +03:00
parent 2fabf125c1
commit 06e4ce4d45
No known key found for this signature in database
GPG key ID: 54487A734A204D71

View file

@ -23,7 +23,10 @@ async function purchaseSubscriptionFromCart(page) {
await fillCheckoutForm(page);
await page.locator('text=Sign up now').click();
await Promise.all([
page.waitForNavigation(),
page.locator('text=Sign up now').click(),
]);
await expectOrderReceivedPage(page);
}
@ -207,9 +210,11 @@ test.describe('Subscriber purchase a Subscription', () => {
await loginIntoPaypal(popup);
await popup.getByText('Continue', { exact: true }).click();
await popup.locator('text=Agree & Subscribe').click();
await page.waitForTimeout(10000);
await Promise.all([
page.waitForNavigation(),
await popup.locator('text=Agree & Subscribe').click(),
]);
await expectOrderReceivedPage(page);
});
@ -226,7 +231,10 @@ test.describe('Subscriber purchase a Subscription', () => {
await fillCheckoutForm(page);
await page.locator('text=Sign up now').click();
await Promise.all([
page.waitForNavigation(),
page.locator('text=Sign up now').click(),
]);
await expectOrderReceivedPage(page);
});