[ ] Does your code follow the WooCommerce Sniffs variant of WordPress coding standards?
[ ] Have you written new tests for your changes, as applicable?
[x] Have you successfully run tests with your changes locally?
[ ] Will this change require new documentation or changes to existing documentation?
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:
Configuring the test suite to run on serial mode to prevent test interferences.
Implementing proper polling mechanisms with appropriate timeouts and intervals for product catalog.
Adjusting inventory count retrieval to wait until inventory data is become available.
Enhancing error handling with try-catch blocks and capturing screenshots on errors.
Adding (New Editor) to the test name for making explicit the difference between c3 and d6 tests with the same name.
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:
Ensure you have the appropriate environment for E2E testing with Square.
Testing steps
Checkout the branch associated with this PR.
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"
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
You may try adding --debug to the test command to see browser screen and Playwright console while running the tests.
Expected outcomes
The specific E2E test d6.woo-sor.spec-with-inventory-new-editor.spec.js:36:5 › OnePlus 8 pushed to Square with inventory (New Editor) @sync should pass successfully, confirming that the issue has been resolved.
Other test in the file d6.woo-sor.spec-with-inventory-new-editor.spec.js:132:5 › Update inventory from Woo to Square @sync not impacted by the change, and also passing successfully.
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.
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:
(New Editor)
to the test name for making explicit the difference betweenc3
andd6
tests with the same name.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:
Testing steps
--debug
to the test command to see browser screen and Playwright console while running the tests.Expected outcomes
d6.woo-sor.spec-with-inventory-new-editor.spec.js:36:5 › OnePlus 8 pushed to Square with inventory (New Editor) @sync
should pass successfully, confirming that the issue has been resolved.d6.woo-sor.spec-with-inventory-new-editor.spec.js:132:5 › Update inventory from Woo to Square @sync
not impacted by the change, and also passing successfully.Changelog entry