An open source design system that's fully customizable and agent ready
TypeScript
test: three busy proofs decode each cast once (#10786)
Christopher Chedeau5797bbf9ebb4
diff --git a/packages/core/src/Lightbox/__tests__/LightboxDismissCancel.interaction.browser.spec.ts b/packages/core/src/Lightbox/__tests__/LightboxDismissCancel.interaction.browser.spec.tsindex b7ccf45d0a..b157bd8bb7 100644--- a/packages/core/src/Lightbox/__tests__/LightboxDismissCancel.interaction.browser.spec.ts+++ b/packages/core/src/Lightbox/__tests__/LightboxDismissCancel.interaction.browser.spec.ts@@ -28,6 +28,7 @@ import {frames,holdAnimations,markElement,+ MARKER_RGB,openStory,releaseAnimations,sampleCurve,@@ -38,7 +39,7 @@ import {type TouchDriver,type TouchScript,touchStoryboard,- trackMarker,+ trackMarkers,waitForAnimation,waitForRest,withStorybook,@@ -457,8 +458,9 @@ test('the cancel keeps moving every frame while the main thread is blocked', asy// A few frames after the block, so the screencast holds its end.await frames(page, 6);const castFrames = await cast.stop();- const tracked = await trackMarker(page, castFrames);- const control = await trackMarker(page, castFrames, {rgb: CONTROL_RGB});+ const [tracked, control] = await trackMarkers(page, castFrames, {+ colors: [MARKER_RGB, CONTROL_RGB],+ });// The spring slows hard at its end. Near the end each 60 Hz frame moves it// about 0.18 of what remains (2π / 0.5 s, critically damped). So within// about 5.6 cast steps of its end a frame moves less than one step, anddiff --git a/packages/lab/src/NavigationStack/__tests__/NavigationStack.interaction.browser.spec.ts b/packages/lab/src/NavigationStack/__tests__/NavigationStack.interaction.browser.spec.tsindex ea7366f596..ad8cf870e5 100644--- a/packages/lab/src/NavigationStack/__tests__/NavigationStack.interaction.browser.spec.ts+++ b/packages/lab/src/NavigationStack/__tests__/NavigationStack.interaction.browser.spec.ts@@ -58,6 +58,7 @@ import {touchStoryboard,traceRendering,trackMarker,+ trackMarkers,waitForRest,watchAnimations,withStorybook,@@ -1170,8 +1171,9 @@ test('a push keeps advancing every frame while the main thread is blocked', asynconst [push] = await watch.started({minProgressMs: 16});await page.waitForTimeout(150);const castFrames = await cast.stop();- const tracked = await trackMarker(page, castFrames);- const control = await trackMarker(page, castFrames, {rgb: CONTROL_RGB});+ const [tracked, control] = await trackMarkers(page, castFrames, {+ colors: [MARKER_RGB, CONTROL_RGB],+ });const proof = busyWindowProof(tracked,{from: block.from, to: Math.min(block.to, push.to)},diff --git a/packages/lab/src/TabBar/__tests__/TabBar.interaction.browser.spec.ts b/packages/lab/src/TabBar/__tests__/TabBar.interaction.browser.spec.tsindex 6681517a4f..39c2ec7dad 100644--- a/packages/lab/src/TabBar/__tests__/TabBar.interaction.browser.spec.ts+++ b/packages/lab/src/TabBar/__tests__/TabBar.interaction.browser.spec.ts@@ -36,6 +36,7 @@ import {installPageFreeze,installTimerGate,markElement,+ MARKER_RGB,merge,openStory,PARTIAL_LIFT_SKIP,@@ -53,7 +54,7 @@ import {touchDriver,touchStoryboard,traceRendering,- trackMarker,+ trackMarkers,waitForAnimation,waitForRest,watchAnimations,@@ -1384,8 +1385,9 @@ test('the slide keeps advancing every frame while the main thread is blocked', aconst block = await blocking;await page.waitForTimeout(150);const castFrames = await cast.stop();- const tracked = await trackMarker(page, castFrames);- const control = await trackMarker(page, castFrames, {rgb: CONTROL_RGB});+ const [tracked, control] = await trackMarkers(page, castFrames, {+ colors: [MARKER_RGB, CONTROL_RGB],+ });const proof = busyWindowProof(tracked,{from: block.from, to: block.to},