-
Notifications
You must be signed in to change notification settings - Fork 218
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 - Verify that the user can purchase the plus subscription with a PayPal account #4615
Conversation
Preview URL 🚀 : https://blurts-server-pr-4615-mgjlpikfea-uk.a.run.app |
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.
LGTM!
@@ -68,6 +71,42 @@ export class PurchasePage { | |||
await frame.fill(".InputElement[name=postal]", "77777"); | |||
} | |||
|
|||
async fillOutPaypalInfo(context: BrowserContext) { | |||
const emailToUse = process.env.E2E_TEST_PAYPAL_LOGIN as string; |
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.
(nit) The paypal email and password can go in the constructor properties
expect(pwdToUse).not.toBeUndefined(); | ||
|
||
//away from mozilla | ||
const pagePromise = context.waitForEvent("page"); |
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.
nice
await newPage.waitForLoadState(); | ||
await newPage.waitForURL(/.*paypal\.com\/checkoutnow.*/); | ||
|
||
const emailPrompt = newPage.locator("#email"); |
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.
just wanted to confirm, are these id's the same when you go through the flow in prod as well?
context, | ||
}) => { | ||
test.skip( | ||
process.env.E2E_TEST_ENV === "production", |
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.
Oh, ignore my previous comment about the production id's
Cleanup completed - database 'blurts-server-pr-4615' destroyed, cloud run service 'blurts-server-pr-4615' destroyed |
References:
Jira: MNTOR-3138
Figma:
Description
Used the test structure for stripe tests, added PayPal payment process workflow, added a few helper methods within purchasePage.ts/
cron tests: https://github.com/mozilla/blurts-server/actions/runs/9356383551
Screenshot (if applicable)
Not applicable.
How to test
npx playwright test -g "Verify that the user can purchase the plus subscription with a PayPal account - monthly"
Checklist (Definition of Done)