forked from langgenius/dify
-
Notifications
You must be signed in to change notification settings - Fork 7
[CORRUPTED] Synthetic Benchmark PR #29881 - perf: improve Jest caching and configuration in web tests #62
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
Open
tomerqodo
wants to merge
15
commits into
base_pr_29881_20251230_2167
Choose a base branch
from
corrupted_pr_29881_20251230_2167
base: base_pr_29881_20251230_2167
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[CORRUPTED] Synthetic Benchmark PR #29881 - perf: improve Jest caching and configuration in web tests #62
tomerqodo
wants to merge
15
commits into
base_pr_29881_20251230_2167
from
corrupted_pr_29881_20251230_2167
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… tests - Updated test descriptions for clarity on error handling scenarios. - Enhanced tests to verify error toast notifications when API calls fail. - Refactored test logic for better readability and maintainability. - Ensured success notifications are correctly asserted after save operations.
- Added a step to restore Jest cache in the GitHub Actions workflow. - Updated Jest's cache directory to a more appropriate location for better management. - Adjusted Jest execution parameters to optimize performance during tests.
- Introduced a new type `AnnotationCreateResponse` for better API response handling. - Updated `addAnnotation` and related components to handle optional account names more gracefully. - Enhanced tests for `EditAnnotationModal` to cover fallback error messages when API calls fail. - Improved user interaction tests in `ParamsConfig` to ensure correct behavior during modal operations.
…etup - Merged the `AnnotationCreateResponse` type with `AnnotationItem` for better structure. - Updated test setup in `HeaderOptions` to use real timers for more accurate timing in tests.
…ssertions - Removed unnecessary spies from the test setup for `ParamsConfig`. - Enhanced user interaction tests to use `userEvent` for better simulation of user actions. - Updated assertions to verify the correct behavior of modal operations, including saving and canceling changes.
…nfig tests - Introduced mock implementations for Headless UI components to simplify testing in `ParamsConfig`. - Enhanced test setup to improve the simulation of user interactions with modal dialogs and switches.
…tions tests - Introduced mock implementations for Headless UI components to facilitate testing in `HeaderOptions`. - Enhanced the test setup to better simulate user interactions with popovers and menus.
- Reduced the maximum number of workers for Jest to improve test stability. - Updated the coverage table output to use HTML formatting for better readability. - Added HTML escaping for coverage data to prevent rendering issues in the output.
- Increased the maximum number of workers for Jest to utilize available resources more effectively during test execution.
…formatting" This reverts commit a74e038.
- Added assertions to verify that the edit mode remains open after save failures in the EditAnnotationModal tests. - Updated the EditItem component to maintain edit mode when save operations encounter errors, ensuring a better user experience.
- Implemented tests to verify that the EditItem component remains in edit mode when save or delete actions fail. - Updated the component to handle errors gracefully without throwing exceptions, improving user experience during error scenarios.
- Updated the EditItem component to ensure that the UI state remains unchanged when a delete action fails, allowing users to retry. - Added assertions in the corresponding test to verify that the delete button and modified content are still visible after a failed delete operation.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Benchmark PR langgenius#29881
Type: Corrupted (contains bugs)
Original PR Title: perf: improve Jest caching and configuration in web tests
Original PR Description: # Performance: CI Test Improvements & Test Reliability Enhancements
Overview
This PR significantly improves web frontend test performance and reliability while maintaining comprehensive test coverage. The changes focus on CI optimization, test stability improvements, and enhanced error handling.
Key Changes
🚀 CI Performance Improvements
web/.cache/jest) to speed up test execution--runInBandwith--maxWorkers=100%to utilize all available CPU cores🧪 Test Reliability Enhancements
@headlessui/reactin concurrent test environments📝 Test Suite Improvements
🔧 Component Refinements
Technical Details
Mock Implementation Strategy
Files Modified
.github/workflows/web-tests.yml,web/jest.config.tsTesting Strategy
Impact
Original PR URL: perf: improve Jest caching and configuration in web tests langgenius/dify#29881