Skip to content

Conversation

@SkyeYoung
Copy link
Member

@SkyeYoung SkyeYoung commented May 12, 2025

Please answer these questions before submitting a pull request, or your PR will get closed.

Why submit this pull request?

  • Bugfix
  • New feature provided
  • Improve performance
  • Backport patches

What changes will this PR take into?

  • add playwright config
  • add workflow and label e2e-test
  • add auth.spec.ts to help check if the workflow works
  • add eslint rules to help lint the test files

Also working fine locally

CleanShot 2025-05-13 at 18 56 58@2x

@SkyeYoung SkyeYoung changed the title feat: e2e workflow feat: e2e workflow, auth test May 13, 2025
@SkyeYoung SkyeYoung marked this pull request as ready for review May 13, 2025 10:55
@SkyeYoung SkyeYoung requested a review from Copilot May 13, 2025 11:12
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 adds end-to-end testing capabilities using Playwright by introducing a dedicated configuration, test specs, supporting utilities, and CI/CD workflow enhancements. Key changes include the addition of a new tsconfig for e2e tests, updates to package.json and ESLint configuration to support testing/linting of e2e files, and various Docker and GitHub workflow files to run the tests in CI.

Reviewed Changes

Copilot reviewed 21 out of 22 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tsconfig.e2e.json New TS configuration for e2e test files
tsconfig.app.json Updated to include specific e2e utility file
src/components/form/Btn.tsx Updated component type signature with polymorphic props
playwright.config.ts Added Playwright configuration for e2e testing
package.json Updated scripts and dependencies to support e2e testing and linting
eslint.config.js Merged ESLint rules including new e2e rules
e2e/utils/*.ts New utilities and test setup for e2e testing
e2e/server/*.yml, Dockerfile New server configuration files for running the test dashboard
e2e/auth.spec.ts New authentication test spec using Playwright
.github/workflows/e2e.yml New GitHub Action workflow to run the e2e test suite
.devcontainer/*.yml, devcontainer.json Updated devcontainer configuration to integrate e2e services
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

viewport: { width: 1920, height: 1080 },
permissions: ['clipboard-read'],
// use chrome
// channel: "chrome",
Copy link

Copilot AI May 13, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider removing or clarifying the commented-out 'channel: "chrome"' configuration if it is no longer needed.

Suggested change
// channel: "chrome",

Copilot uses AI. Check for mistakes.
Comment on lines 66 to +68
export default tseslint.config(
{ ignores: ['dist', 'src/routeTree.gen.ts'] },
e2eRules,
Copy link

Copilot AI May 13, 2025

Choose a reason for hiding this comment

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

[nitpick] Review the merge order of the e2eRules configuration with the main ESLint settings to ensure there are no unintended overrides. Clarifying the configuration merge could improve maintainability.

Suggested change
export default tseslint.config(
{ ignores: ['dist', 'src/routeTree.gen.ts'] },
e2eRules,
export const e2eRulesConfig = e2eRules;
export default tseslint.config(
{ ignores: ['dist', 'src/routeTree.gen.ts'] },

Copilot uses AI. Check for mistakes.
Copy link
Member

@juzhiyuan juzhiyuan left a comment

Choose a reason for hiding this comment

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

LGTM!

@juzhiyuan juzhiyuan merged commit 8cdd4f4 into apache:master May 13, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants