chore: FIT-1001: fix flakey tests
This pull request focuses on improving the reliability and determinism of end-to-end and integration tests across several test files by replacing arbitrary time-based waits (e.g., I.wait(1), cy.wait(500)) with more deterministic, animation-frame-based waits using I.waitTicks. It also removes the .tag("@flakey") and .retry(3) markers from tests, signaling increased test stability. Additionally, some integration tests have been updated to ensure elements are interactable before proceeding, further reducing flakiness.
Test Stability and Reliability Improvements
- Replaced all hardcoded time-based waits (e.g.,
I.wait(1),cy.wait(500)) withI.waitTicks, which waits for a specific number of animation frames, making tests more deterministic and less prone to timing-related flakiness. This change was applied across audio region, paragraph-enhanced, video timeline, and sync audio test suites. [1] [2] [3] [4] - Removed
.tag("@flakey")and.retry(3)from all affected test scenarios, indicating that the tests are now considered stable and should not be retried automatically. [1] [2] [3] [4]
Test Logic and Interaction Improvements
- Updated test logic in
taxonomy-mig-per-item.cy.tsto ensure elements are fully rendered and interactable before attempting to interact with them, using visibility and enabled checks instead of arbitrary waits. This makes the tests more robust and less likely to fail due to rendering delays. [1] [2]
Test Code Consistency
- Standardized the use of
I.waitTicksand added comments to clarify the purpose of each wait, improving code readability and maintainability throughout the test suites. [1] [2] [3] [4] [5] [6] [7] [8]
These changes collectively enhance the reliability, determinism, and maintainability of the automated test suite.
Deploy Preview for label-studio-docs-new-theme canceled.
| Name | Link |
|---|---|
| Latest commit | 13f1d9393e311d42505196e40b4e06ad3fe1b944 |
| Latest deploy log | https://app.netlify.com/projects/label-studio-docs-new-theme/deploys/691c7be6a75f7c000869b705 |
Deploy Preview for heartex-docs canceled.
| Name | Link |
|---|---|
| Latest commit | 13f1d9393e311d42505196e40b4e06ad3fe1b944 |
| Latest deploy log | https://app.netlify.com/projects/heartex-docs/deploys/691c7be6dc5ec700086d2abc |
Deploy Preview for label-studio-storybook failed. Why did it fail? β
| Name | Link |
|---|---|
| Latest commit | 13f1d9393e311d42505196e40b4e06ad3fe1b944 |
| Latest deploy log | https://app.netlify.com/projects/label-studio-storybook/deploys/691c7be60480720008166b40 |
Deploy Preview for label-studio-playground failed. Why did it fail? β
| Name | Link |
|---|---|
| Latest commit | 13f1d9393e311d42505196e40b4e06ad3fe1b944 |
| Latest deploy log | https://app.netlify.com/projects/label-studio-playground/deploys/691c7be674abc50009da616e |
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 56.51%. Comparing base (c1b62ce) to head (06c50b6).
:warning: Report is 2 commits behind head on develop.
:exclamation: There is a different number of reports uploaded between BASE (c1b62ce) and HEAD (06c50b6). Click for more details.
HEAD has 1 upload less than BASE
Flag BASE (c1b62ce) HEAD (06c50b6) pytests 1 0
Additional details and impacted files
@@ Coverage Diff @@
## develop #8834 +/- ##
============================================
- Coverage 66.72% 56.51% -10.22%
============================================
Files 811 554 -257
Lines 63432 40207 -23225
Branches 10690 10761 +71
============================================
- Hits 42325 22721 -19604
+ Misses 21104 17482 -3622
- Partials 3 4 +1
| Flag | Coverage Ξ | |
|---|---|---|
| lsf-e2e | 47.81% <ΓΈ> (-5.03%) |
:arrow_down: |
| lsf-integration | 49.11% <ΓΈ> (-0.26%) |
:arrow_down: |
| lsf-unit | 8.39% <ΓΈ> (+0.29%) |
:arrow_up: |
| pytests | ? |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
@yyassi-heartex Are the num of ticks premeditated in each instance? how would this affect performance?