Skip to content

test(e2e): fix flaky CLI shortcuts cases#5864

Merged
chenjiahan merged 1 commit intomainfrom
shortcuts_cases_0817
Aug 17, 2025
Merged

test(e2e): fix flaky CLI shortcuts cases#5864
chenjiahan merged 1 commit intomainfrom
shortcuts_cases_0817

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Summary

  • Fixed the flaky CLI shortcuts e2e cases.
  • Added the new runCommand test helper.
cli:shotcuts2

Checklist

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

Copilot AI review requested due to automatic review settings August 17, 2025 12:52
@netlify
Copy link
Copy Markdown

netlify bot commented Aug 17, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit a2fb115
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/68a1d082f860e10008e8caed
😎 Deploy Preview https://deploy-preview-5864--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: 71 (🔴 down 4 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.

Copy link
Copy Markdown
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 fixes flaky CLI shortcuts end-to-end tests by refactoring the test helper functions and improving the test execution reliability.

Key changes:

  • Created a new runCommand helper function for executing arbitrary commands
  • Refactored existing runCli to use the new runCommand helper internally
  • Simplified CLI shortcuts tests by replacing manual process management with the new test helper

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
e2e/scripts/shared.ts Introduced runCommand helper and refactored runCli to use it, removed unused expectPoll import
e2e/cases/cli/shortcuts/index.test.ts Completely refactored CLI shortcuts tests to use the new runCommand helper with built-in log handling
e2e/cases/cli/watch-files-array/index.test.ts Removed unused childProcess variable
e2e/cases/cli/reload-config/index.test.ts Removed unused childProcess variable
e2e/cases/cli/build-watch-restart/index.test.ts Removed unused childProcess variable
e2e/cases/cli/build-watch-options/index.test.ts Removed unused childProcess variable
e2e/cases/alias/tsconfig-paths-reload/index.test.ts Removed unused childProcess variable

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

@chenjiahan chenjiahan merged commit ca86deb into main Aug 17, 2025
12 checks passed
@chenjiahan chenjiahan deleted the shortcuts_cases_0817 branch August 17, 2025 12:58
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