Skip to content

Fix flaky slider Cypress test#2441

Merged
kswenson merged 1 commit intomainfrom
fix-flaky-slider-test
Mar 4, 2026
Merged

Fix flaky slider Cypress test#2441
kswenson merged 1 commit intomainfrom
fix-flaky-slider-test

Conversation

@kswenson
Copy link
Member

@kswenson kswenson commented Mar 4, 2026

Summary

  • Close the inspector palette after setting the animation rate in setAnimationRate(), preventing the palette from covering the play/pause button (the CI failure on smaller viewports)
  • Increase retry timeout to 15s on animation-dependent assertions where the slider needs to reach target values during a ~10s animation cycle

Test plan

  • npx cypress run --spec cypress/e2e/slider.spec.ts passes locally

🤖 Generated with Claude Code

…animation rate and increase retry timeout for animation-dependent assertions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kswenson kswenson added the v3 CODAP v3 label Mar 4, 2026
@codecov
Copy link

codecov bot commented Mar 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.78%. Comparing base (a40dd61) to head (7734c0b).
⚠️ Report is 2 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (a40dd61) and HEAD (7734c0b). Click for more details.

HEAD has 14 uploads less than BASE
Flag BASE (a40dd61) HEAD (7734c0b)
cypress 15 1
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2441       +/-   ##
===========================================
- Coverage   85.32%   69.78%   -15.55%     
===========================================
  Files         763      763               
  Lines       42310    42310               
  Branches    10071    10071               
===========================================
- Hits        36102    29525     -6577     
- Misses       6196    12779     +6583     
+ Partials       12        6        -6     
Flag Coverage Δ
cypress 39.30% <ø> (-29.63%) ⬇️
jest 58.06% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cypress
Copy link

cypress bot commented Mar 4, 2026

codap-v3    Run #10489

Run Properties:  status check passed Passed #10489  •  git commit e85b21e2d7: Increment the build number
Project codap-v3
Branch Review main
Run status status check passed Passed #10489
Run duration 02m 11s
Commit git commit e85b21e2d7: Increment the build number
Committer github-actions[bot]
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 4
View all changes introduced in this branch ↗︎

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 addresses flakiness in the Slider Cypress E2E test by ensuring the slider’s inspector palette doesn’t obstruct the play/pause controls and by extending the retry window for assertions that depend on animation timing.

Changes:

  • Close the slider inspector palette after setting the animation rate to avoid UI overlap with the play/pause button.
  • Add an optional timeout parameter to the slider variable value input lookup helper.
  • Update animation-dependent assertions in slider.spec.ts to wait up to 15s for the slider value to reach expected targets.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
v3/cypress/support/elements/slider-tile.ts Adds optional timeout to getVariableValueInput() and closes the inspector palette after setting animation rate.
v3/cypress/e2e/slider.spec.ts Uses getVariableValueInput(..., 15000) with contain.value assertions for animation-dependent waits.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kswenson
Copy link
Member Author

kswenson commented Mar 4, 2026

Merging without human review, as it's just a test change.

@kswenson kswenson merged commit 01fd2bd into main Mar 4, 2026
16 of 17 checks passed
@kswenson kswenson deleted the fix-flaky-slider-test branch March 4, 2026 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v3 CODAP v3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants