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

Convert Shopper Multi Currency Widget spec to Playwright #10204

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from

Conversation

ismaeldcom
Copy link
Contributor

@ismaeldcom ismaeldcom commented Jan 21, 2025

Fixes #10067

Changes proposed in this Pull Request

  • Fix addMulticurrencyWidget, the isWidgetAdded check is looking for a heading that is inside an iframe, we need to first wait until every sidebar loads and then look for the widget iframe.
  • Implement REST API createOrder method, to get a pay order link without using the UI, which is faster and less dependent on WC changes. I think there is room for more API utils, and a refactor to use a singleton, but let's leave that for future optimizations.
  • Implement Playwright spec
  • Remove Puppeteer spec

I've explored the option of using the REST API for adding the widget, to avoid "testing" something outside of WooPayments, but it requires three different calls, making it even slower. Anyway, we could consider doing this differently later, like adding the widget using the CLI in the setup script.

Testing instructions

  • Checkout dev/10067-convert-shopper-multi-currency-widget-spec
  • Run npm run test:e2e-pw shopper-multi-currency-widget
  • Test should pass locally.
  • Test should pass in GH actions.

  • Run npm run changelog to add a changelog file, choose patch to leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.
  • Covered with tests (or have a good reason not to test in description ☝️)
  • Tested on mobile (or does not apply)

Post merge

@ismaeldcom ismaeldcom self-assigned this Jan 21, 2025
@botwoo

This comment was marked as off-topic.

This comment was marked as off-topic.

@ismaeldcom ismaeldcom marked this pull request as draft January 22, 2025 10:49
@ismaeldcom ismaeldcom marked this pull request as ready for review January 22, 2025 12:21
@ismaeldcom ismaeldcom requested a review from a team January 22, 2025 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

E2E Playwright Migration: convert shopper-multi-currency-widget spec
2 participants