-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Fix flaky E2E test: "should refresh the page only if the user clicks on button" #60100
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 E2E test: "should refresh the page only if the user clicks on button" #60100
Conversation
Testing GuidelinesHi @Aljullu , Apart from reviewing the code changes, please make sure to review the testing instructions (Guide) and verify that relevant tests (E2E, Unit, Integration, etc.) have been added or updated as needed. Reminder: PR reviewers are required to document testing performed. This includes:
|
📝 WalkthroughWalkthroughThe test setup for the price filter block theme now includes retry logic when creating a template from a file. If transient network errors occur, the process is retried up to three times with exponential backoff delays. No changes were made to exported or public entities. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: .coderabbit.yml 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (2)**/*.{php,js,jsx,ts,tsx}📄 CodeRabbit Inference Engine (.cursor/rules/code-quality.mdc)
Files:
**/*.{php,js,ts,jsx,tsx}⚙️ CodeRabbit Configuration File
Files:
🧠 Learnings (2)📓 Common learnings
plugins/woocommerce/client/blocks/tests/e2e/tests/price-filter/price-filter.block_theme.spec.ts (3)Learnt from: gigitux Learnt from: dinhtungdu Learnt from: samueljseay 🔇 Additional comments (1)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It sounds good to me to try this approach to reduce the test flakiness. 👍
Submission Review Guidelines
Changes proposed in this Pull Request
This PR fixes a flaky E2E test that intermittently fails with "socket hang up" errors during template compilation in the price filter block tests.
Changes:
templateCompiler
fixture inprice-filter.block_theme.spec.ts
Why This Change:
The test
"should refresh the page only if the user clicks on button"
was failing intermittently during CI runs whenrequestUtils.createTemplateFromFile()
encountered network connectivity issues while making REST API calls to create WordPress templates. This caused the GitHub Actions flaky test reporter to automatically create issues when tests passed after auto-retrying.Closes WOOPLUG-3414.
How to test the changes in this Pull Request
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:
Changelog entry
Automatically create a changelog entry from the details below.
This Pull Request does not require a changelog entry. (Comment required below)
Changelog Entry Comment
Comment
This PR only fixes test flakiness and does not change any user-facing functionality or API behavior. Test infrastructure improvements do not require changelog entries as they don't affect end users or developers using WooCommerce.