-
Notifications
You must be signed in to change notification settings - Fork 154
[Test Automation] Cleanup unnecessary codes and node version update #1762
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
[Test Automation] Cleanup unnecessary codes and node version update #1762
Conversation
…ependencies for improved compatibility
…and comments, and improve formatting for better readability
WalkthroughThis PR updates the Node.js version in the CI workflow from 23 to 24, bumps multiple dependency versions in the e2e test package, applies whitespace formatting to a test page file, removes numerous selectors from the test selectors object, and restructures test data by removing properties and reorganizing field option definitions. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested labels
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. 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.
Pull request overview
This PR updates the Node.js runtime environment from version 23 to 24 in the CI workflow and comprehensively updates npm dependencies for the E2E testing suite to ensure compatibility with Node.js 24. Additionally, it removes unused test data structures and selectors to improve code maintainability.
Key changes:
- Upgraded Node.js version from 23 to 24 in GitHub Actions workflow
- Updated major E2E testing dependencies including
@playwright/test,@faker-js/faker,@wordpress/env, and TypeScript packages - Removed unused field option test data structures and selector definitions from test files
Reviewed changes
Copilot reviewed 4 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/e2e-wpuf.yml |
Updated Node.js version from 23 to 24 in CI workflow setup |
tests/e2e/package.json |
Upgraded dev dependencies (@faker-js/faker, @playwright/test, @types/node, typescript) and regular dependencies (@wordpress/env, dotenv) to latest versions |
tests/e2e/package-lock.json |
Updated lockfile with resolved versions for all upgraded dependencies and their transitive dependencies |
tests/e2e/utils/testData.ts |
Removed unused field option test data (FieldOptionsData object) and unused properties from form data objects (formName, repeatField, registration form post names); cleaned up comment inconsistencies |
tests/e2e/pages/selectors.ts |
Removed unused selectors for form validation, plugin installation, and various field options; updated clickDownload selector with more specific path |
tests/e2e/pages/fieldOptionSettings.ts |
Fixed indentation for validateDateFormat method |
Files not reviewed (1)
- tests/e2e/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| async validateDateFormat(expectedFormat: string) { | ||
| await this.assertionValidate(Selectors.fieldOptionsSettings.fieldOptionsPanel.dateTimeOptions.validateFormat(expectedFormat)); | ||
| console.log(`Date format validated: ${expectedFormat}`); | ||
| } |
Copilot
AI
Dec 4, 2025
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.
The validateDateFormat method has inconsistent indentation. It has 8 spaces (2 indentation levels) while it should have 4 spaces (1 indentation level) to align with other methods at the same scope level like configureDateFormat above it and enableTimeInput below it.
| async validateDateFormat(expectedFormat: string) { | |
| await this.assertionValidate(Selectors.fieldOptionsSettings.fieldOptionsPanel.dateTimeOptions.validateFormat(expectedFormat)); | |
| console.log(`Date format validated: ${expectedFormat}`); | |
| } | |
| async validateDateFormat(expectedFormat: string) { | |
| await this.assertionValidate(Selectors.fieldOptionsSettings.fieldOptionsPanel.dateTimeOptions.validateFormat(expectedFormat)); | |
| console.log(`Date format validated: ${expectedFormat}`); | |
| } |
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
tests/e2e/pages/fieldOptionSettings.ts (1)
740-743: Inconsistent indentation introduced.The
validateDateFormatmethod now has extra leading indentation that doesn't match the formatting of other methods in this class (compare withenableTimeInputat line 745 orconfigureDateFormatat line 736).- async validateDateFormat(expectedFormat: string) { - await this.assertionValidate(Selectors.fieldOptionsSettings.fieldOptionsPanel.dateTimeOptions.validateFormat(expectedFormat)); - console.log(`Date format validated: ${expectedFormat}`); - } + async validateDateFormat(expectedFormat: string) { + await this.assertionValidate(Selectors.fieldOptionsSettings.fieldOptionsPanel.dateTimeOptions.validateFormat(expectedFormat)); + console.log(`Date format validated: ${expectedFormat}`); + }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
tests/e2e/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (5)
.github/workflows/e2e-wpuf.yml(1 hunks)tests/e2e/package.json(1 hunks)tests/e2e/pages/fieldOptionSettings.ts(1 hunks)tests/e2e/pages/selectors.ts(1 hunks)tests/e2e/utils/testData.ts(8 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Agent
- GitHub Check: CodeQL analysis (javascript-typescript)
🔇 Additional comments (6)
tests/e2e/package.json (2)
28-36: Dependency updates look appropriate.The minor and patch version bumps for @playwright/test, @types/node, typescript, @wordpress/env, and dotenv are reasonable maintenance updates that align with the Node.js 24 upgrade goal.
27-27: @faker-js/faker major version bump: v9.x → v10.x compatibility confirmed.The upgrade to v10.1.0 includes ESM-only requirement and removed deprecated APIs. However, the test suite uses only stable, forward-compatible faker methods (
internet.*,person.*,word.words(),lorem.*,string.numeric()). No deprecated v9 APIs are present, and the package.json already specifies"type": "module"for ESM support. No code changes required for this upgrade.tests/e2e/utils/testData.ts (2)
537-549: Test data values properly aligned with type definitions.The value assignments for
showAddressLine2Test,contentRestrictionTest, andconditionalLogicTestcorrectly match their updated type definitions.
335-403: Test data structure simplified and cleaned up.The restructured
FieldOptionsTestDatatype definition consolidates related test properties.FieldOptionsTestDatais properly exported and actively used throughoutfieldOptionSettingsTest.spec.tswith no compilation issues.tests/e2e/pages/selectors.ts (1)
768-768: Selector definition looks correct.The
clickDownloadXPath selector targets the Download button in the WordPress editor sidebar and follows the established selector pattern in this file..github/workflows/e2e-wpuf.yml (1)
44-44: Node.js 24 is now LTS (as of October 28, 2025)—the original concern is not applicable.Node.js 24 entered Active LTS status in October 2025 with support through ~April 2027/2028. The concern about using a "current release" rather than LTS is no longer valid. However, note that the workflow currently uses node-version 23 (line 44); if upgrading to 24, standard dependency verification is still recommended as a best practice.
Likely an incorrect or invalid review comment.
Description:
This pull request updates both the Node.js version used in the CI workflow and a wide range of dependencies in the
tests/e2e/package-lock.jsonfile, primarily to their latest versions. The main goal is to ensure compatibility with Node.js 24 and maintain the security and stability of the end-to-end testing setup.Dependency and environment updates:
Node.js and npm compatibility
.github/workflows/e2e-wpuf.ymlnow uses Node.js version 24 instead of 23, aligning with updated package requirements.package-lock.jsonto match latest Node.js compatibility.Major dependency upgrades for E2E tests
@inquirer/*packages (e.g.,checkbox,confirm,core,editor,expand,input,number,password,prompts,rawlist,search,select,type) have been upgraded to their latest versions, improving stability and compatibility with Node.js 24. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]@playwright/test,@faker-js/faker,@wordpress/env,dotenv, and TypeScript-related packages. [1] [2] [3]Security and compatibility fixes
ansi-regex,ansi-styles,strip-ansi, anddebug) were updated to patch versions, addressing known vulnerabilities and improving compatibility with newer Node.js. [1] [2] [3] [4]These updates collectively ensure that the end-to-end testing environment is up-to-date, secure, and fully compatible with the latest Node.js LTS release.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.