Skip to content

Conversation

@chenjiahan
Copy link
Member

Summary

Simplify test files by introducing the new findFIle and getFileContent helpers to find and read files instead of manual lookup logic.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings September 25, 2025 04:36
@netlify
Copy link

netlify bot commented Sep 25, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 5103e31
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/68d4cbafc43a08000878dd24
😎 Deploy Preview https://deploy-preview-6248--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 51 (🔴 down 19 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@chenjiahan chenjiahan changed the title test(e2e): replace manual file lookup with helpers test(e2e): replace manual file lookup with helpers Sep 25, 2025
Copy link
Contributor

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 simplifies E2E test files by introducing two new helper functions (findFile and getFileContent) to replace manual file lookup logic throughout the test suite. The changes reduce code duplication and improve maintainability of file operations in tests.

  • Adds findFile and getFileContent helper functions with hash-aware file matching
  • Removes unused plugins parameter from the build/dev API functions
  • Standardizes plugin configuration to be consistently placed under config.plugins

Reviewed Changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
e2e/helper/utils.ts Adds new file helper functions with type definitions and hash pattern matching
e2e/helper/jsApi.ts Removes unused plugins parameter from build/dev functions and simplifies createRsbuild
e2e/cases/polyfill/helper.ts Refactored to use new findFile helper instead of manual file lookup
Various test files Updated to use getFileContent helper and moved plugins to config object
Various config files Added missing plugin imports to rsbuild.config.ts files

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

@chenjiahan chenjiahan merged commit d0238e7 into main Sep 25, 2025
11 checks passed
@chenjiahan chenjiahan deleted the filename_helper_0925 branch September 25, 2025 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants