Skip to content
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

Merged
merged 7 commits into from
Jun 5, 2024

Conversation

mozilloid
Copy link
Contributor

@mozilloid mozilloid commented Jun 1, 2024

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)

  • Localization strings (if needed) have been added.
  • Commits in this PR are minimal and have descriptive commit messages.
  • I've added or updated the relevant sections in readme and/or code comments
  • I've added a unit test to test for potential regressions of this bug.
  • If this PR implements a feature flag or experimentation, the Ship Behind Feature Flag status in Jira has been set
  • Product Owner accepted the User Story (demo of functionality completed) or waived the privilege.
  • All acceptance criteria are met.
  • Jira ticket has been updated (if needed) to match changes made during the development process.
  • Jira ticket has been updated (if needed) with suggestions for QA when this PR is deployed to stage.

@mozilloid mozilloid requested review from rafeerahman and pdehaan June 1, 2024 03:00
Copy link

github-actions bot commented Jun 1, 2024

@mozilloid mozilloid self-assigned this Jun 1, 2024
@mozilloid mozilloid marked this pull request as ready for review June 3, 2024 18:48
Copy link
Contributor

@rafeerahman rafeerahman left a 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;
Copy link
Contributor

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");
Copy link
Contributor

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");
Copy link
Contributor

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",
Copy link
Contributor

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

@mozilloid mozilloid removed the request for review from pdehaan June 5, 2024 01:52
@mozilloid mozilloid merged commit 528929e into main Jun 5, 2024
15 checks passed
@mozilloid mozilloid deleted the mntor-3138 branch June 5, 2024 01:56
Copy link

github-actions bot commented Jun 5, 2024

Cleanup completed - database 'blurts-server-pr-4615' destroyed, cloud run service 'blurts-server-pr-4615' destroyed

@mozilloid mozilloid restored the mntor-3138 branch June 7, 2024 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants