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

Fix Flaky PW test: Multi-currency widget setup #10263

Merged
merged 6 commits into from
Jan 29, 2025

Conversation

jessepearson
Copy link
Contributor

Fixes #10262

Changes proposed in this Pull Request

  • Rename the test file to have the merchant prefix.
  • Add a restoreCurrencies call before running the tests to ensure the currencies are properly set up.
  • Add a more defined locator to open the widget settings sidebar.
  • Use Prettier to remove unnecessary awaits.

Testing instructions

  • Tests should pass in full suite, or just by the file being called.

  • 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)

@jessepearson jessepearson requested a review from a team January 28, 2025 18:23
@jessepearson jessepearson self-assigned this Jan 28, 2025
@jessepearson jessepearson marked this pull request as ready for review January 28, 2025 18:23
@botwoo

This comment was marked as off-topic.

This comment was marked as off-topic.

Copy link
Contributor

@allie500 allie500 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this one! Code changes look good to me. I ran the full suite of Playwright tests and these passed. I did get two failures though.

 2 failed
    [shopper] › shopper/shopper-checkout-purchase.spec.ts:47:8 › Successful purchase › Carding protection true › using a basic card 
    [shopper] › shopper/shopper-checkout-purchase.spec.ts:58:8 › Successful purchase › Carding protection true › using a 3DS card 
  146 passed (38.7m)

Running these tests in isolation worked. All tests passed.

% npm run test:e2e-pw merchant-multi-currency-widget        

> woocommerce-payments@8.8.0 test:e2e-pw
> ./tests/e2e-pw/test-e2e-pw.sh merchant-multi-currency-widget

🎭 Running Playwright e2e tests in default headless mode, skipping @todo.

Running 6 tests using 1 worker
[setup] › auth.setup.ts:37:6 › authenticate as admin
Using existing merchant state.
[setup] › auth.setup.ts:83:6 › authenticate as customer
Using existing customer state.
  6 passed (37.1s)

I think we'll need to deal with those other two failures in a separate issue.

@jessepearson jessepearson added this pull request to the merge queue Jan 29, 2025
Merged via the queue into develop with commit d08985f Jan 29, 2025
25 checks passed
@jessepearson jessepearson deleted the dev/10262-flaky-mccy-test branch January 29, 2025 11:45
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.

Flaky PW test: Multi-currency widget setup › can update widget properties › opens widget settings
5 participants