feat: Frontend test optimization - smart selection, build caching, and flaky test fixes#9294
Open
feat: Frontend test optimization - smart selection, build caching, and flaky test fixes#9294
Conversation
…iles changed with quarantine for flaky tests
✅ Deploy Preview for label-studio-docs-new-theme canceled.
|
✅ Deploy Preview for heartex-docs canceled.
|
✅ Deploy Preview for label-studio-playground ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for label-studio-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
yyassi-heartex
approved these changes
Jan 30, 2026
Collaborator
|
This PR is stale because it has been open 45 days with no activity. Remove |
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
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.
Summary
This PR significantly improves frontend test efficiency, stability, and cost-effectiveness through:
Changes
1. Smart Test Selection (
select-frontend-tests.sh)Three-tier detection system that analyzes changed files:
*.scss,*.css,*.md,*.yml, assetscore/**,stores/**,package.json2. Build & Serve Optimization
Before: Dev server with HMR, compiles on-demand, ~30-60s startup
After: Production build + static serve, ~2s startup, fully cacheable
ciBabel environment for coverage-instrumented production buildsLSF_TEST_MODEflag to load feature flags in production mode3. Parallel Test Execution
Enabled
cypress-parallelto use both CPU cores on ubuntu-latest runners:npx cypress-parallel -t 2 -d "libs/editor/tests/integration/e2e"4. Flaky Test Fixes
Replaced non-deterministic waits with proper state synchronization:
Fixed tests:
video/regions.cy.tsvideo/timeline_region_loop.cy.tsaudio/audio_regions.cy.ts5. Flaky Test Quarantine
Created
tests-yarn-integration-flaky.ymlthat runs quarantined tests withcontinue-on-error: true- visible but non-blocking while fixes are validated.Expected Impact
Test Plan