woocommerce / woocommerce-square

Square POS and Payments Integration
https://woo.com/products/square
Other
11 stars 7 forks source link

[E2E] Fix test d6.woo-sor.spec-with-inventory-new-editor > OnePlus 8 pushed to Square with inventory #249

Open MiguelAxcar opened 2 days ago

MiguelAxcar commented 2 days ago

All Submissions:


Changes proposed in this Pull Request:

Changes proposed in this Pull Request:

This PR fixes the failing E2E test d6.woo-sor.spec-with-inventory-new-editor.spec.js:36:5 › OnePlus 8 pushed to Square with inventory @sync.

The test failure was due to the timeouts caused by async operations and improper polling intervals for Square catalog updates.

The changes in this PR include:

These updates ensure the test passes consistently and confirm that the inventory sync process functions as expected.

Steps to test the changes in this Pull Request:

Prerequisites:

  1. Ensure you have the appropriate environment for E2E testing with Square.

Testing steps

  1. Checkout the branch associated with this PR.
  2. Run the test in the file using the following command:
    npx playwright test tests/e2e/specs/d6.woo-sor.spec-with-inventory-new-editor.spec.js --config=tests/e2e/config/playwright.config.js --grep "OnePlus 8 pushed to Square with inventory (New Editor) @sync"
  3. You can also try running all the tests in the file to ensure that other tests in the file weren't impacted by the change, using the following command:
    npx playwright test tests/e2e/specs/d6.woo-sor.spec-with-inventory-new-editor.spec.js --config=tests/e2e/config/playwright.config.js
  4. You may try adding --debug to the test command to see browser screen and Playwright console while running the tests.

Expected outcomes

Changelog entry

Dev - Resolved the errors on the failing E2E test d6.woo-sor.spec-with-inventory-new-editor.spec.js:36:5 › OnePlus 8 pushed to Square with inventory (New Editor) @sync.

MiguelAxcar commented 2 days ago

Hi @iamdharmesh :wave: ! Here's another PR for fixing a failing E2E test. Thank you!