-
Notifications
You must be signed in to change notification settings - Fork 1
Extend enable-all settings step to validate text inputs #297
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
base: develop
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR enhances the "Enable all features" smoke test to validate that all text input fields in WP Rocket settings accept test values without triggering browser validation dialogs. This helps catch regressions where built-in validation could prevent saving settings when all options are enabled.
- Adds
enableAllOptionsWithTextInputs()method that enables all settings and validates text inputs - Implements
validateTextInputsWithoutDialogs()to iterate through all sections and test text/textarea fields - Introduces form submit suppression during validation to prevent unintended data saves
- Updates the smoke test scenario to use the new validation step
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| utils/page-utils.ts | Adds new methods for enabling all options with text input validation, including dialog detection, form submit suppression/resumption helpers |
| src/support/steps/general.ts | Adds new Cucumber step definition "I enable all settings with text inputs" that calls the enhanced validation method |
| src/features/enable-all-features.feature | Updates scenario to use the new step that validates text inputs instead of just enabling settings |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Miraeld
left a comment
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.
I've made a single comment, morelike a question about one review that copilot did, other than this looks fine to me
Co-authored-by: Michael Lee <[email protected]>
|
@Mai-Saad @hanna-meda So should we block this PR for the moment based on this? |
|
@jeawhanlee Agree about blocking for now. However, having 2nd thought about
What is there now is another step in the same scenario, I think this unneeded duplication and it could only be single step as it was before .. No need for new scenario / step , updating the current step to include text while enable options is enough. |
@Mai-Saad Just for proper test separation so one scenario is not covering 2 types of test even if they might share some things in common. Moving forward if we are to continue with the same scenario, I believe we need to update the feature name & description as well as the scenario description to be explanatory about what is being tested, otherwise we should consider splitting it. |
Description
Fixes #295
Updates the “Enable all features” smoke test to type “test” into every WP Rocket text field and fail immediately if any browser validation alert appears. This helps catch regressions where built-in validation prevents saving when all options are enabled.
Type of change
Detailed scenario
What was tested
Ran the “Enable all features” scenario with
npm run test:test:Observe the step “I enable all settings with text inputs”:
How to test
Run command
npm run test:smokeTechnical description
Documentation
validateTextInputsWithoutDialogs()which:dialogevent and reports which field triggered it.(__wprSubmitInterceptor)so we never save unintended data.When I enable all settings with text inputsnow reuses that helper for cleaner scenarios.New dependencies
None.
Risks
None.
Mandatory Checklist
Code validation
Code style
Unticked items justification
If some mandatory items are not relevant, explain why in this section.
Additional Checks