-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mntor-3138-1 - Simple paypal tests fix. Merged with e2e-slack-integration-and-CI-fixes #4646
Conversation
Preview URL 🚀 : https://blurts-server-pr-4646-mgjlpikfea-uk.a.run.app |
@@ -82,8 +82,7 @@ export class PurchasePage { | |||
await this.paypalButton.click(); | |||
const newPage = await pagePromise; | |||
await newPage.waitForLoadState(); | |||
await newPage.waitForURL(/.*paypal\.com.*\/checkout.*/); | |||
|
|||
await newPage.waitForURL(/.*paypal\.com.*checkout.*/); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change, and do we still need a slash after the domain?
ie: /paypal\.com\/.*checkout/
Also, what is the URL that we need the .*
in the middle?
I tried signing up for VPN (in Canada) using SubPlat+PayPal and it gave me something like this URL:
https://www.paypal.com/checkoutnow?sessionID=qwerty
Curious if the domain is very different in staging that we can't simplify the RegExp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah for some reason the links are different on firefox vs chrome when testing. I believe for firefox, it has 'intent=checkout' instead of '/checkout' so this regex captures it.
src/e2e/specs/purchase.spec.ts
Outdated
@@ -72,18 +72,15 @@ test.describe(`${process.env.E2E_TEST_ENV} - Breach Scan, Monitor Plus Purchase | |||
// fill out subscription payment | |||
await purchasePage.authorizationCheckbox.check(); | |||
await purchasePage.fillOutStripeCardInfo(); | |||
await purchasePage.payNowButton.click(); | |||
await purchasePage.payNowButton.click({ force: true }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: Why does this need { force: true }
?
https://www.bondaracademy.com/blog/do-not-force-playwright
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is from the code I merged from rafee's pr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran into a flaky test once where the button was clicked/selected but nothing happened, thought this might help 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleanup completed - database 'blurts-server-pr-4646' destroyed, cloud run service 'blurts-server-pr-4646' destroyed |
References:
Jira: -
Figma:
Description
Fixed the paypal tests.
Screenshot (if applicable)
Not applicable.
How to test
Checklist (Definition of Done)