Skip to content
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

feat: add playwright e2e testing framework #4468

Merged
merged 4 commits into from
Sep 22, 2024
Merged

feat: add playwright e2e testing framework #4468

merged 4 commits into from
Sep 22, 2024

Conversation

anncwb
Copy link
Collaborator

@anncwb anncwb commented Sep 22, 2024

Description

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.

Checklist

ℹ️ Check all checkboxes - this will indicate that you have done everything in accordance with the rules in CONTRIBUTING.

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs:dev command.
  • Run the tests with pnpm test.
  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Summary by CodeRabbit

Release Notes

  • New Features

    • Added "Star History" section to the README files, showcasing the repository's star count over time.
    • Introduced end-to-end testing scripts for authentication functionalities using Playwright.
  • Accessibility Improvements

    • Enhanced accessibility for buttons in authentication components by adding aria-label attributes.
  • Development Environment Updates

    • Updated initialization command for the development environment.
    • Streamlined dependency installation and testing commands.
  • Testing Enhancements

    • Added new Playwright configuration for end-to-end testing.
    • Introduced new end-to-end test scripts and login automation functions.
    • Added a new entry for end-to-end testing in the configuration files.

@anncwb anncwb added the perf label Sep 22, 2024
@anncwb anncwb requested review from vince292007 and a team as code owners September 22, 2024 13:18
Copy link

changeset-bot bot commented Sep 22, 2024

⚠️ No Changeset found

Latest commit: 0651a88

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

coderabbitai bot commented Sep 22, 2024

Caution

Review failed

The pull request is closed.

Walkthrough

The pull request introduces several changes across multiple files, primarily focusing on enhancing the development environment and improving user verification features. Key modifications include updating commands in the .gitpod.yml file, adding sections for "Star History" in various README files, and implementing new testing scripts and configurations for Playwright. Additionally, accessibility improvements have been made in several Vue components, and new end-to-end tests have been created to ensure the proper functioning of the authentication process.

Changes

File/Directory Change Summary
.gitpod.yml Command updated from pnpm run dev to pnpm run dev:play.
README.ja-JP.md, README.md, README.zh-CN.md New section "Star History" added with an image link for star history charts.
docs/src/en/guide/essentials/development.md Scripts modified: removed bootstrap, updated reinstall to use pnpm install, and changed test:unit to vitest run --dom.
internal/lint-configs/eslint-config/src/configs/node.ts Added @playwright/test to dependencies in ESLint configuration.
internal/lint-configs/eslint-config/src/custom-config.ts New ESLint rules added for playwright.config.ts files, disabling specific rules.
package.json Multiple changes: removed bootstrap, updated reinstall and test:unit, added test:e2e, and modified devDependencies to include @playwright/test, happy-dom, and playwright.
packages/@core/ui-kit/shadcn-ui/package.json Updated main and module fields to point to source files instead of distribution files, and added new fields #main and #module.
packages/effects/common-ui/src/components/captcha/slider-captcha/slider-captcha-action.vue Added name="captcha-action" attribute to root element.
packages/effects/common-ui/src/ui/authentication/*.vue Added aria-label attributes to buttons in forget-password, login, and register components for accessibility improvements.
playground/__tests__/e2e/auth-login.spec.ts New end-to-end test file for the authentication login page using Playwright.
playground/__tests__/e2e/common/auth.ts New function authLogin added for automating the login process with slider captcha.
playground/package.json Added scripts for end-to-end testing: test:e2e, test:e2e-ui, and test:e2e-codegen.
playground/playwright.config.ts New Playwright configuration file introduced with various test settings.
pnpm-workspace.yaml Added and removed several packages including @playwright/test, happy-dom, and removed @types/jsdom and jsdom.
turbo.json New entry for end-to-end testing added under the stub section.
vitest.config.ts Updated test environment from jsdom to happy-dom.

Possibly related PRs

Poem

🐰 In the meadow where code does play,
Changes bloom like flowers in May.
With stars that twinkle in README bright,
And captchas sliding, oh what a sight!
Let's hop along with tests that run,
Celebrating changes, oh what fun! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    -- I pushed a fix in commit <commit_id>, please review it.
    -- Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    -- @coderabbitai generate unit testing code for this file.
    -- @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    -- @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    -- @coderabbitai read src/utils.ts and generate unit testing code.
    -- @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    -- @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@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: 6

Outside diff range and nitpick comments (4)
turbo.json (1)

36-36: Consider moving the test:e2e entry to a more appropriate section.

The introduction of the test:e2e entry is a good step towards configuring end-to-end testing. However, placing it under the stub section might not be the most suitable location.

Consider the following suggestions:

  1. Move the test:e2e entry to a more relevant section in the configuration file, such as creating a new testing section or placing it alongside other testing-related configurations.

  2. Provide a brief comment explaining the purpose and potential usage of the test:e2e entry. This will help other developers understand its significance and how it relates to end-to-end testing.

  3. If there are any specific configuration options that need to be set for end-to-end testing, consider adding them within the test:e2e object. This will make the configuration more comprehensive and easier to understand.

By addressing these points, the configuration file will have a clearer structure and provide better guidance for configuring end-to-end testing.

README.zh-CN.md (1)

135-137: Approve the addition of the "Star History" section.

The "Star History" section is a valuable addition to the README file, providing users and contributors with a visual representation of the repository's popularity over time. The placement of the section after the "CHANGELOG" and before the "Contributor" section is appropriate.

To improve accessibility, consider adding alt text to the image:

-[![Star History Chart](https://api.star-history.com/svg?repos=vbenjs/vue-vben-admin&type=Date)](https://star-history.com/#vbenjs/vue-vben-admin&Date)
+[![Star History Chart](https://api.star-history.com/svg?repos=vbenjs/vue-vben-admin&type=Date)](https://star-history.com/#vbenjs/vue-vben-admin&Date)
README.md (1)

135-138: Useful addition of the star history chart. Consider the external API dependency and use a relative repository path.

The star history chart is a valuable addition to the README, providing insights into the repository's popularity and growth over time.

However, please note the following:

  • The chart relies on an external API (star-history.com), which introduces a dependency. Consider monitoring the availability and reliability of this service to ensure the chart remains accessible.
  • The image URL currently uses an absolute repository path (vbenjs/vue-vben-admin). To handle potential repository name changes, consider using a relative path instead.

To use a relative repository path, update the image URL as follows:

-[![Star History Chart](https://api.star-history.com/svg?repos=vbenjs/vue-vben-admin&type=Date)](https://star-history.com/#vbenjs/vue-vben-admin&Date)
+[![Star History Chart](https://api.star-history.com/svg?repos=vbenjs/vue-vben-admin&type=Date)](https://star-history.com/#vbenjs/vue-vben-admin&Date)

This way, the chart will still work correctly if the repository name changes in the future.

playground/__tests__/e2e/common/auth.ts (1)

6-6: Translate code comments to English for consistency

The comments are currently written in Chinese. For better collaboration among all team members, especially those who may not read Chinese, please consider translating the comments to English.

Also applies to: 18-18, 19-19, 26-26, 33-33, 39-39, 43-43

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 4b3d2d2 and 024067c.

Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing (21)
  • .gitpod.yml (1 hunks)
  • README.ja-JP.md (1 hunks)
  • README.md (1 hunks)
  • README.zh-CN.md (1 hunks)
  • docs/src/en/guide/essentials/development.md (1 hunks)
  • docs/src/guide/essentials/development.md (1 hunks)
  • internal/lint-configs/eslint-config/src/configs/node.ts (1 hunks)
  • internal/lint-configs/eslint-config/src/custom-config.ts (1 hunks)
  • package.json (4 hunks)
  • packages/@core/ui-kit/shadcn-ui/package.json (2 hunks)
  • packages/effects/common-ui/src/components/captcha/slider-captcha/slider-captcha-action.vue (1 hunks)
  • packages/effects/common-ui/src/ui/authentication/forget-password.vue (1 hunks)
  • packages/effects/common-ui/src/ui/authentication/login.vue (1 hunks)
  • packages/effects/common-ui/src/ui/authentication/register.vue (1 hunks)
  • playground/tests/e2e/auth-login.spec.ts (1 hunks)
  • playground/tests/e2e/common/auth.ts (1 hunks)
  • playground/package.json (1 hunks)
  • playground/playwright.config.ts (1 hunks)
  • pnpm-workspace.yaml (3 hunks)
  • turbo.json (1 hunks)
  • vitest.config.ts (1 hunks)
Additional context used
GitHub Check: Test (ubuntu-latest)
playground/__tests__/e2e/auth-login.spec.ts

[failure] 5-5: playground/tests/e2e/auth-login.spec.ts
Error: Playwright Test did not expect test.beforeEach() to be called here.
Most common reasons include:

  • You are calling test.beforeEach() in a configuration file.
  • You are calling test.beforeEach() in a file that is imported by the configuration file.
  • You have two different versions of @playwright/test. This usually happens
    when one of the dependencies in your package.json depends on @playwright/test.
    ❯ TestTypeImpl._currentSuite node_modules/.pnpm/[email protected]/node_modules/playwright/lib/common/testType.js:71:13
    ❯ TestTypeImpl._hook node_modules/.pnpm/[email protected]/node_modules/playwright/lib/common/testType.js:144:24
    ❯ Function.beforeEach node_modules/.pnpm/[email protected]/node_modules/playwright/lib/transform/transform.js:262:12
    ❯ playground/tests/e2e/auth-login.spec.ts:5:6
Additional comments not posted (41)
.gitpod.yml (1)

6-6: Clarify the purpose and impact of the dev:play script.

I noticed the command has been updated from pnpm run dev to pnpm run dev:play. Could you please provide more context about what the dev:play script does and how it differs from the dev script?

Understanding the purpose and impact of this change will help in assessing whether it aligns with the PR objectives and if it has any potential side effects on the development workflow.

vitest.config.ts (1)

8-8: Verify existing tests with the new Happy DOM environment.

The change from JSDOM to Happy DOM as the test environment is a good move towards better performance and compatibility. However, it's crucial to ensure that existing tests are not adversely affected by this change.

Please take the following actions:

  1. Review existing tests, especially those that rely on DOM manipulation or rendering, and make necessary adjustments to ensure compatibility with Happy DOM.
  2. Run the entire test suite with the new environment to verify that all tests pass without any unexpected behavior.
  3. If any tests fail or exhibit unusual behavior, investigate and address those issues before merging this change.
playground/__tests__/e2e/auth-login.spec.ts (3)

1-3: LGTM!

The imports are correctly specified and follow the proper syntax. The custom authLogin function is imported from the appropriate module.


9-14: LGTM!

The test case is well-structured and follows the Playwright testing conventions. It correctly retrieves the page title and asserts that it contains the expected string.


16-19: Verify the implementation of the authLogin function.

The test case correctly calls the authLogin function to verify the login functionality. However, the effectiveness of this test case relies on the correctness and reliability of the authLogin function.

Please ensure that the authLogin function is implemented correctly and handles various scenarios, such as:

  • Login with valid credentials
  • Login with invalid credentials
  • Error handling and appropriate error messages
  • Edge cases and boundary conditions

You can use the following script to navigate to the authLogin function and review its implementation:

Verification successful

Retrying the search for the authLogin function implementation.

The previous script failed to recognize the typescript file type. Please run the following script to search for the authLogin function definition using the correct file type identifier.


Verify the source of the authLogin function used in the test.

To ensure that the authLogin function in your test auth-login.spec.ts is correctly implemented and sourced, please run the following script to extract its import statement:


Review the implementation of the authLogin function in the test utilities.

To ensure that the authLogin function used in your test is implemented correctly and handles all necessary scenarios, please run the following script to display its implementation:


Verified the implementation of the authLogin function.

The authLogin function in playground/__tests__/e2e/common/auth.ts is correctly implemented and handles the login process comprehensively, including captcha interactions and necessary assertions. The test case in auth-login.spec.ts appropriately utilizes this function to verify the login functionality.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Navigate to the `authLogin` function and review its implementation.

# Test: Search for the function definition. Expect: The function is defined in the `./common/auth` module.
rg --type typescript -A 5 $'authLogin\('

Length of output: 76


Script:

#!/bin/bash
# Description: Retry searching for the `authLogin` function implementation with the correct file type.

# Test: Search for the function definition using the correct TypeScript file type. Expect: The function is defined in the `./common/auth` module.
rg --type ts -A 5 'authLogin\('

Length of output: 2209


Script:

#!/bin/bash
# Description: Extract the import statement of `authLogin` in the test file.

rg 'import .*authLogin' playground/__tests__/e2e/auth-login.spec.ts

Length of output: 112


Script:

#!/bin/bash
# Description: Display the implementation of `authLogin` in the test utilities.

cat playground/__tests__/e2e/common/auth.ts

Length of output: 1760

packages/effects/common-ui/src/components/captcha/slider-captcha/slider-captcha-action.vue (1)

54-54: LGTM!

The addition of the name attribute with the value captcha-action is a valid and descriptive choice. It can be used as a reference to the element for scripting or styling purposes, improving code readability and maintainability.

internal/lint-configs/eslint-config/src/configs/node.ts (1)

27-27: LGTM!

The addition of '@playwright/test' to the allowModules array in the n/no-extraneous-import rule configuration is consistent with the PR objective of introducing the Playwright testing framework. This change allows developers to import and use the @playwright/test module without triggering an ESLint error.

playground/package.json (1)

23-26: LGTM! The addition of Playwright scripts enhances the project's testing capabilities.

The introduction of the Playwright end-to-end testing framework and the associated scripts (test:e2e, test:e2e-ui, test:e2e-codegen) aligns with the PR objective and brings several benefits to the project:

  1. test:e2e enables running end-to-end tests using Playwright, ensuring the application functions as expected from a user's perspective.
  2. test:e2e-ui provides an option to run the tests with a user interface, which can be helpful for debugging and visualizing the test execution.
  3. test:e2e-codegen allows generating code for Playwright tests, streamlining the test creation process and reducing the effort required to set up new tests.

Overall, these additions enhance the project's testing capabilities and contribute to maintaining a high-quality codebase.

packages/effects/common-ui/src/ui/authentication/forget-password.vue (1)

98-98: Accessibility improvement!

Adding the aria-label attribute with the value "submit" enhances the accessibility of the button for users relying on assistive technologies. It accurately conveys the purpose of the button, making the form more inclusive. Great work on improving the user experience!

packages/effects/common-ui/src/ui/authentication/register.vue (1)

100-100: Accessibility Enhancement: LGTM!

The addition of the aria-label attribute with the value "register" enhances the accessibility of the registration form by providing a clear and descriptive label for the submit button. This is particularly beneficial for users relying on assistive technologies, such as screen readers.

The change aligns with the best practices for improving web accessibility and does not introduce any functional or visual changes to the button itself.

playground/playwright.config.ts (13)

15-21: LGTM!

The expect timeout configuration is set to a reasonable value of 5000 milliseconds. This allows enough time for most conditions to be met while preventing tests from hanging indefinitely.


23-23: LGTM!

The forbidOnly configuration is a good practice to prevent accidental commits of focused tests (test.only) to CI. It ensures that all tests are executed on CI and no tests are skipped unintentionally.


25-25: LGTM!

The outputDir configuration is set to a reasonable location (node_modules/.e2e/test-results/) to store test artifacts. It keeps the test artifacts separate from the source code and other project files.


27-74: LGTM!

The projects configuration is set up with a 'chromium' project using the 'Desktop Chrome' device configuration. This is sufficient for initial testing. The commented-out projects provide options for testing on additional browsers and devices in the future. It's a good practice to start with a single browser for faster test execution and add more browsers as needed.


76-79: LGTM!

The reporter configuration includes a 'list' reporter for a concise summary of test results in the console and an 'html' reporter for generating an HTML report in the specified output folder. Using multiple reporters is a good practice for comprehensive test reporting.


81-81: LGTM!

The retries configuration is set to retry failed tests twice on CI and zero times locally. This is a good practice to account for flaky tests or temporary environment issues on CI while preventing unnecessary retries during local development. The retry count of 2 is reasonable to balance test stability and execution time.


82-82: LGTM!

The testDir configuration is set to ./__tests__/e2e, which is a common convention for storing end-to-end tests in a separate directory. It keeps the end-to-end tests separate from other types of tests (e.g., unit tests, integration tests).


84-84: LGTM!

The timeout configuration is set to 30 seconds (30 * 1000 milliseconds), which is reasonable for most end-to-end test scenarios. It allows enough time for tests to complete while preventing tests from running indefinitely. If tests consistently exceed this timeout, it may indicate a performance issue or a need to optimize the tests.


86-95: LGTM!

The use configuration specifies shared settings for all the projects. The actionTimeout is set to 0, which means there is no limit on the time each action can take. This may need to be adjusted based on the specific requirements of the tests. The baseURL is set to http://localhost:5555, which is appropriate for running tests locally. The headless mode is enabled only on CI systems, which is a good practice for faster execution on CI. The trace option is set to 'retain-on-failure', which is useful for debugging and understanding the cause of test failures.


98-102: LGTM!

The webServer configuration specifies the settings for running a local development server before starting the tests. The command property uses pnpm preview --port 5555 for CI and pnpm dev for local environments, ensuring that the appropriate command is used based on the environment. The port property is set to 5555, which matches the baseURL configuration. The reuseExistingServer property is set to true for local environments, allowing it to reuse an existing server if available, which can speed up test execution during local development. For CI, reuseExistingServer is set to false, ensuring that a fresh server instance is started for each test run.


105-105: LGTM!

The workers configuration specifies the number of concurrent worker processes for running tests. Setting the number of workers to 1 on CI ensures that tests are run sequentially, which can be useful for debugging and avoiding resource contention on CI machines. Leaving the number of workers undefined for local environments allows Playwright to determine the optimal number of workers based on the available system resources, which can speed up test execution during development.


14-14: LGTM!

The config object is correctly declared as a constant of type PlaywrightTestConfig, which is imported from the @playwright/test package. This ensures type safety and autocompletion for the configuration properties and prevents accidental modifications to the configuration.


108-108: LGTM!

The config object is correctly exported as the default export at the end of the file, after the configuration object is fully defined. This allows the configuration to be easily imported and use

package.json (5)

57-57: LGTM!

The change to the reinstall script looks good. Using pnpm install is a standard way to install dependencies.


58-58: LGTM!

The modification to the test:unit script looks good. Including the run --dom option for vitest is necessary for running tests that interact with the DOM, which aligns with the introduction of Playwright for e2e testing.


59-59: LGTM!

The addition of the test:e2e script looks good. Using turbo for running end-to-end tests is a valid approach and aligns with the PR objective of introducing Playwright for e2e testing.


66-66: LGTM!

The changes to the dependencies look good. Removing JSDOM-related dependencies and adding Playwright-related dependencies is consistent with the shift towards using Playwright for e2e testing, as mentioned in the PR objectives.

Also applies to: 83-83, 87-87


117-117: LGTM!

The removal of the playwright dependency from the neverBuiltDependencies section looks good. Building the playwright dependency is likely required for running e2e tests, which aligns with the introduction of Playwright for e2e testing.

internal/lint-configs/eslint-config/src/custom-config.ts (1)

137-144: LGTM! The changes align with the PR objective.

The new ESLint configuration rule specifically targets Playwright configuration files and disables certain rules to provide flexibility in writing those files. This aligns with the PR objective of introducing the Playwright end-to-end testing framework to the project.

The changes are isolated to Playwright configuration files and do not affect other parts of the codebase.

packages/effects/common-ui/src/ui/authentication/login.vue (1)

132-132: LGTM!

The addition of the aria-label attribute with the value "login" enhances the accessibility of the button element. This change allows assistive technologies to accurately convey the purpose of the button to users.

pnpm-workspace.yaml (5)

32-32: LGTM!

The addition of the @playwright/test package with version ^1.47.2 aligns with the PR objectives of introducing the Playwright e2e testing framework. The version constraint allows for minor and patch updates while ensuring compatibility.


106-106: Approve the replacement of jsdom with happy-dom.

The addition of the happy-dom package with version ^15.7.4 and removal of the jsdom package suggests a replacement of the DOM testing library. happy-dom is a lightweight alternative to jsdom for testing web applications in Node.js environments. The version constraint allows for minor and patch updates while ensuring compatibility.


124-124: LGTM!

The addition of the playwright package with version ^1.47.2 aligns with the PR objectives of introducing the Playwright e2e testing framework. The version constraint allows for minor and patch updates while ensuring compatibility.


Line range hint 1-1: Approve the removal of @types/jsdom.

The removal of the @types/jsdom package is consistent with the removal of the jsdom package. Since jsdom has been replaced with happy-dom, the corresponding type definitions are no longer needed.


Line range hint 1-1: Approve the removal of jsdom.

The removal of the jsdom package and addition of the happy-dom package suggests a replacement of the DOM testing library. happy-dom is a lightweight alternative to jsdom for testing web applications in Node.js environments.

docs/src/guide/essentials/development.md (2)

108-108: Verify if pnpm bootstrap is required for the project setup.

The change simplifies the reinstallation process by directly using pnpm install. This should be sufficient if the project doesn't use a monorepo structure or require package linking.

However, if the project uses a monorepo setup and requires package linking, removing pnpm bootstrap could potentially break the setup. In that case, please clarify the need for this change.


110-110: LGTM!

The addition of the --dom flag to the vitest command enhances the unit testing capabilities by enabling tests that require a browser-like environment. This is useful for testing components that interact with the DOM.

README.ja-JP.md (1)

136-138: LGTM!

The addition of the "スター歴史" (Star History) section with the image link to display the repository's star history chart is a valuable enhancement to the README file. It provides insights into the project's popularity and growth over time.

The section is positioned appropriately within the document flow, and the image link syntax is correct, including the repository name to generate the chart dynamically.

docs/src/en/guide/essentials/development.md (2)

108-108: LGTM!

The change from pnpm bootstrap to pnpm install in the reinstall script is a minor modification that should not have any significant impact on the functionality. The removal of the bootstrap script is consistent with this change.


110-110: LGTM!

The addition of the run command and the --dom flag in the test:unit script specifies that the tests should be run in a DOM environment. This is important for testing components that interact with the DOM.

playground/__tests__/e2e/common/auth.ts (1)

45-45: Verify the selector for the login button

Ensure that the selector await page.getByRole('button', { name: 'login' }).click(); correctly identifies the login button. If the button's accessible name differs (due to localization or missing aria-label), this selector might fail.

playground/__tests__/e2e/auth-login.spec.ts Show resolved Hide resolved
packages/@core/ui-kit/shadcn-ui/package.json Outdated Show resolved Hide resolved
packages/@core/ui-kit/shadcn-ui/package.json Outdated Show resolved Hide resolved
packages/@core/ui-kit/shadcn-ui/package.json Outdated Show resolved Hide resolved
playground/__tests__/e2e/common/auth.ts Outdated Show resolved Hide resolved
playground/__tests__/e2e/common/auth.ts Outdated Show resolved Hide resolved
@anncwb anncwb added chore and removed perf labels Sep 22, 2024
@anncwb anncwb merged commit 2a83f1d into main Sep 22, 2024
13 checks passed
@anncwb anncwb deleted the feature/e2e branch September 22, 2024 13:35
@vince292007 vince292007 added feature and removed chore labels Sep 23, 2024
@coderabbitai coderabbitai bot mentioned this pull request Oct 4, 2024
16 tasks
@github-actions github-actions bot locked and limited conversation to collaborators Oct 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants