diff --git a/packages/core/src/Switch/__tests__/Switch.interaction.browser.spec.ts b/packages/core/src/Switch/__tests__/Switch.interaction.browser.spec.ts index 3a596bbf5d70c..358101bf3cd16 100644 --- a/packages/core/src/Switch/__tests__/Switch.interaction.browser.spec.ts +++ b/packages/core/src/Switch/__tests__/Switch.interaction.browser.spec.ts @@ -28,6 +28,7 @@ import { armHold, blockMainThread, compareCurve, + controlColor, cubicBezier, countBetween, advanceFrozenPage, @@ -38,6 +39,7 @@ import { installPageFreeze, installTimerGate, markElement, + MARKER_RGB, openStory, releaseAnimations, seekAnimations, @@ -53,6 +55,7 @@ import { traceRendering, trackControl, trackMarker, + trackMarkers, waitForRest, withStorybook, writeEvidence, @@ -2359,11 +2362,13 @@ test.describe('Switch touch presentation (UISwitch, iOS 26.2), under a finger', castFrames: Parameters[1], starts: [number, number], ): Promise { - const pageTime = pageTimesOnControls(await trackControl(page, castFrames), { - ahead: await trackControl(page, castFrames, {ahead: true}), + const [control, ahead, tracked] = await trackMarkers(page, castFrames, { + colors: [controlColor(), controlColor({ahead: true}), MARKER_RGB], + }); + const pageTime = pageTimesOnControls(control, { + ahead, controlStarts: starts, }); - const tracked = await trackMarker(page, castFrames); const shown = tracked.filter( (f): f is typeof f & {box: NonNullable} => f.box != null && f.box.width > 0 && f.box.height > 0, @@ -3305,8 +3310,9 @@ test.describe('Switch touch presentation (UISwitch, iOS 26.2), under a finger', // The red channel's mean in an 8 px square: a scalar on x. With both // controls, a WebKit proof judges each frame at its time on the // controls' clock, at display rate. - const control = await trackControl(page, read); - const ahead = await trackControl(page, read, {ahead: true}); + const [control, ahead] = await trackMarkers(page, read, { + colors: [controlColor(), controlColor({ahead: true})], + }); const colour = await trackBrightness(page, read, {...probe, size: 8}); runs.push({ tracked: colour, diff --git a/packages/core/src/Tooltip/__tests__/TooltipClosedTriggerAnchor.interaction.browser.spec.ts b/packages/core/src/Tooltip/__tests__/TooltipClosedTriggerAnchor.interaction.browser.spec.ts index d8ae7437d9e70..36535e388505a 100644 --- a/packages/core/src/Tooltip/__tests__/TooltipClosedTriggerAnchor.interaction.browser.spec.ts +++ b/packages/core/src/Tooltip/__tests__/TooltipClosedTriggerAnchor.interaction.browser.spec.ts @@ -21,12 +21,13 @@ import { import { blockMainThread, busyWindowProof, + controlColor, markElement, + MARKER_RGB, openStory, startBusyControl, startScreencast, - trackControl, - trackMarker, + trackMarkers, withStorybook, } from '@astryxdesign/interaction-harness'; @@ -89,8 +90,9 @@ test('a surface around a closed tooltip trigger keeps moving through a 500 ms ma }); await page.waitForTimeout(150); const frames = await cast.stop(); - const tracked = await trackMarker(page, frames); - const control = await trackControl(page, frames); + const [tracked, control] = await trackMarkers(page, frames, { + colors: [MARKER_RGB, controlColor()], + }); // Judged against the compositor control in the same frames: the surface // moves on every frame the control does. const proof = busyWindowProof(tracked, block, {settledWithin: 2, control});