Skip to content

ci: fixed faulty carousel and table tests#503

Merged
agliga merged 4 commits intomainfrom
tests
Feb 9, 2026
Merged

ci: fixed faulty carousel and table tests#503
agliga merged 4 commits intomainfrom
tests

Conversation

@agliga
Copy link
Collaborator

@agliga agliga commented Feb 9, 2026

  • Added mocking timeouts for carousel. Carousels had some flaky tests which would fail due to timeout issues. This should fix that
  • Added a mock for scrolltransition. This was what was causing a lot of flakiness and slow tests.
  • Tables had some faulty tests which were not actually waiting for assetions. We had a await waitFor in a forEach. Changed this to do a map and await for Promises.all
  • Updated tables to actually correctly disable links (links should not be "disabled")

Bonus changes

  • Updated react to clean up fake timers
  • Added a mock to debounce. This debounce seems to have been triggering after the test is shut down.

Copilot AI review requested due to automatic review settings February 9, 2026 20:28
@changeset-bot
Copy link

changeset-bot bot commented Feb 9, 2026

⚠️ No Changeset found

Latest commit: 2726b98

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

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

Stabilizes flaky carousel and table loading tests by improving async handling and mocking time/tween behavior, plus updates table loading markup expectations around disabling interactive elements.

Changes:

  • Reworked table loading tests to properly await assertions (replacing forEach(async ...)).
  • Added Vitest fake timers + mocked scroll transition to reduce carousel test flakiness/timeouts.
  • Updated table header sort button markup to apply tabindex="-1" while loading (and snapshot updates).

Reviewed changes

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

File Description
packages/ebayui-core/src/components/ebay-table/test/loading/test.browser.js Fixes async assertion waiting and updates expectations for disabled buttons/links in loading state.
packages/ebayui-core/src/components/ebay-table/test/snapshots/test.server.js.snap Snapshot updates to reflect loading-state tabindex changes.
packages/ebayui-core/src/components/ebay-table/index.marko Adds tabindex management for sort buttons during loading.
packages/ebayui-core/src/components/ebay-carousel/test/test.browser.js Introduces fake timers and mocks scroll transition implementation to reduce test flakiness.

@agliga agliga merged commit 306b359 into main Feb 9, 2026
3 checks passed
@agliga agliga deleted the tests branch February 9, 2026 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants