Skip to content

test: Add google pay test automation - #1682

Open
prajwalnl wants to merge 10 commits into
mainfrom
google-pay-test-automation
Open

test: Add google pay test automation#1682
prajwalnl wants to merge 10 commits into
mainfrom
google-pay-test-automation

Conversation

@prajwalnl

@prajwalnl prajwalnl commented Jul 9, 2026

Copy link
Copy Markdown

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

This PR adds a standalone JavaScript automation script for testing the Google Pay payment flow locally using Puppeteer.

The test requires an existing Chrome profile that:

  • Is signed in to a Google account.
  • Has access to make Google Pay test payments.

Because these requirements depend on a developer’s local Chrome session, the test is intended for local execution and cannot run in CI.

Folder structure

The Puppeteer tests use a dedicated, extensible structure:

puppeteer-tests/
|── googlepay/
│ └── gpay-test.js
|── package.json
|── package-lock.json
|── setup-profile.js
└── README.md

How it works

  1. Installs the dependencies from the isolated puppeteer-tests package.
  2. Copies the selected Chrome profile to a puppeteer-chrome-profile directory beside the repository.
  3. Excludes browser cache directories while copying the profile.
  4. Refreshes the copied profile when the profile setup command is run again.
  5. Launches Chrome using the copied, signed-in profile.
  6. Opens the demo store and completes a Google Pay payment.
  7. Verifies that the payment succeeds.

A copied profile is necessary because launching Chrome without it creates a new, signed-out browser session. Running automation directly against the active Chrome profile could corrupt profile files or sign the user out.

All setup and execution commands are documented in puppeteer-tests/README.md and work across macOS, Linux, Windows Command Prompt, and PowerShell.

The Puppeteer dependency and lockfile are scoped to puppeteer-tests because they are only required by the automation tests and not by the application source code.

Note: The initial Google Pay test targets https://hyperswitch-demo-store.netlify.app (https://hyperswitch-demo-store.netlify.app). It can be extended later to test other hosted URLs or a locally running SDK.

Screen.Recording.2026-07-07.at.12.42.33.PM.mov

How did you test it?

Checklist

  • I ran npm run re:build
  • I reviewed submitted code
  • I added unit tests for my changes where possible

@semanticdiff-com

semanticdiff-com Bot commented Jul 9, 2026

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  puppeteer-tests/README.md Unsupported file format
  puppeteer-tests/googlepay/gpay-test.js  0% smaller
  puppeteer-tests/package-lock.json  0% smaller
  puppeteer-tests/package.json  0% smaller
  puppeteer-tests/setup-profile.js  0% smaller

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🚫 Missing Linked Issue

Hi 👋 This pull request does not appear to be linked to any open issue yet.

Linking your PR to an issue helps keep the project tidy and ensures the issue is closed automatically.

✔️ How to fix this

  • Add a keyword like Fixes #123 or Closes #456 to your PR description or a commit message.
  • Or link it manually using the "Linked issues" panel in the PR sidebar.

Tip: You can link multiple issues.
🚫 Note: If only one issue is linked, it must be open for this check to pass.

Once linked, this check will pass automatically on your next push or when you re-run the workflow.

Thanks for helping maintainers! 🙌

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🚫 Missing Linked Issue

Hi 👋 This pull request does not appear to be linked to any open issue yet.

Linking your PR to an issue helps keep the project tidy and ensures the issue is closed automatically.

✔️ How to fix this

  • Add a keyword like Fixes #123 or Closes #456 to your PR description or a commit message.
  • Or link it manually using the "Linked issues" panel in the PR sidebar.

Tip: You can link multiple issues.
🚫 Note: If only one issue is linked, it must be open for this check to pass.

Once linked, this check will pass automatically on your next push or when you re-run the workflow.

Thanks for helping maintainers! 🙌

1 similar comment
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🚫 Missing Linked Issue

Hi 👋 This pull request does not appear to be linked to any open issue yet.

Linking your PR to an issue helps keep the project tidy and ensures the issue is closed automatically.

✔️ How to fix this

  • Add a keyword like Fixes #123 or Closes #456 to your PR description or a commit message.
  • Or link it manually using the "Linked issues" panel in the PR sidebar.

Tip: You can link multiple issues.
🚫 Note: If only one issue is linked, it must be open for this check to pass.

Once linked, this check will pass automatically on your next push or when you re-run the workflow.

Thanks for helping maintainers! 🙌

@prajwalnl prajwalnl linked an issue Jul 9, 2026 that may be closed by this pull request
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.

test: Add google pay automation script

4 participants