Skip to content

Conversation

@Rubaiyat-E-Mohammad
Copy link
Contributor

@Rubaiyat-E-Mohammad Rubaiyat-E-Mohammad commented Dec 4, 2025

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.json file, 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

  • The CI workflow in .github/workflows/e2e-wpuf.yml now uses Node.js version 24 instead of 23, aligning with updated package requirements.
  • Updated minimum required npm version to 10 in package-lock.json to match latest Node.js compatibility.

Major dependency upgrades for E2E tests

  • Most @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]
  • Upgraded testing tools and environment dependencies, including @playwright/test, @faker-js/faker, @wordpress/env, dotenv, and TypeScript-related packages. [1] [2] [3]

Security and compatibility fixes

  • Several transitive dependencies (such as ansi-regex, ansi-styles, strip-ansi, and debug) 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

  • Chores
    • Updated CI/CD pipeline to use Node.js version 24.
    • Bumped testing framework and tool dependencies to latest stable versions for improved compatibility and performance.
    • Refined test infrastructure by cleaning up test data structures and selectors to streamline the test suite.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 4, 2025

Walkthrough

This 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

Cohort / File(s) Summary
CI/Workflow
.github/workflows/e2e-wpuf.yml
Updated Node.js version from 23 to 24 in the "Use desired version of NodeJS" step
Dependencies
tests/e2e/package.json
Bumped versions: @faker-js/faker (^9.9.0 → ^10.1.0), @playwright/test (^1.54.2 → ^1.57.0), @types/node (^24.3.0 → ^24.10.1), typescript (^5.9.2 → ^5.9.3), @wordpress/env (^10.28.0 → ^10.36.0), dotenv (^17.2.1 → ^17.2.3)
Test Utilities
tests/e2e/pages/fieldOptionSettings.ts
Applied indentation/whitespace adjustments to the validateDateFormat method; no behavioral changes
Test Selectors
tests/e2e/pages/selectors.ts
Removed numerous selector properties across multiple groups including login, settings, plugin install, permalink, user creation, categories/tags, payments, downloads, form presets, field options, frontend fields, pro features, and validation-related selectors
Test Data
tests/e2e/utils/testData.ts
Removed repeatField from PostForm, formName from ProductForm/DownloadsForm, rfPostName1–4 from RegistrationForm; removed FieldOptionsData export; restructured and reorganized FieldOptionsTestData properties with additions and removals of option-related fields

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • tests/e2e/pages/selectors.ts: Requires verification that all removed selectors are no longer in use across the test suite
  • tests/e2e/utils/testData.ts: Significant restructuring of FieldOptionsTestData demands careful review of renamed/reorganized properties and their impact on dependent tests
  • Removal of public exports: Confirm that no external test files depend on the removed public properties from Selectors, PostForm, ProductForm, DownloadsForm, RegistrationForm, and FieldOptionsData

Possibly related PRs

Suggested labels

Ready to Merge

Poem

🐰 Hopping through the test files with glee,
Removing old selectors from the tree,
Node.js bounces from 23 to 24,
Dependencies updated, tests more pure,
E2E workflows run swift and sure!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: Node.js version update (23→24) and cleanup of unnecessary test code (selectors, test data, formatting).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

Copilot AI left a 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.

Comment on lines +740 to +743
async validateDateFormat(expectedFormat: string) {
await this.assertionValidate(Selectors.fieldOptionsSettings.fieldOptionsPanel.dateTimeOptions.validateFormat(expectedFormat));
console.log(`Date format validated: ${expectedFormat}`);
}
Copy link

Copilot AI Dec 4, 2025

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.

Suggested change
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}`);
}

Copilot uses AI. Check for mistakes.
Copy link

@coderabbitai coderabbitai bot left a 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 validateDateFormat method now has extra leading indentation that doesn't match the formatting of other methods in this class (compare with enableTimeInput at line 745 or configureDateFormat at 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

📥 Commits

Reviewing files that changed from the base of the PR and between b427741 and 3d7940a.

⛔ Files ignored due to path filters (1)
  • tests/e2e/package-lock.json is 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, and conditionalLogicTest correctly match their updated type definitions.


335-403: Test data structure simplified and cleaned up.

The restructured FieldOptionsTestData type definition consolidates related test properties. FieldOptionsTestData is properly exported and actively used throughout fieldOptionSettingsTest.spec.ts with no compilation issues.

tests/e2e/pages/selectors.ts (1)

768-768: Selector definition looks correct.

The clickDownload XPath 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.

@arifulhoque7 arifulhoque7 merged commit 86d9e47 into weDevsOfficial:develop Dec 4, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants