Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
armHold,
blockMainThread,
compareCurve,
controlColor,
cubicBezier,
countBetween,
advanceFrozenPage,
Expand All @@ -38,6 +39,7 @@ import {
installPageFreeze,
installTimerGate,
markElement,
MARKER_RGB,
openStory,
releaseAnimations,
seekAnimations,
Expand All @@ -53,6 +55,7 @@ import {
traceRendering,
trackControl,
trackMarker,
trackMarkers,
waitForRest,
withStorybook,
writeEvidence,
Expand Down Expand Up @@ -2359,11 +2362,13 @@ test.describe('Switch touch presentation (UISwitch, iOS 26.2), under a finger',
castFrames: Parameters<typeof trackMarker>[1],
starts: [number, number],
): Promise<ClockedFrame[]> {
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<typeof f.box>} =>
f.box != null && f.box.width > 0 && f.box.height > 0,
Expand Down Expand Up @@ -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});
Comment thread
astracat-bot[bot] marked this conversation as resolved.
Resolved
runs.push({
tracked: colour,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ import {
import {
blockMainThread,
busyWindowProof,
controlColor,
markElement,
MARKER_RGB,
openStory,
startBusyControl,
startScreencast,
trackControl,
trackMarker,
trackMarkers,
withStorybook,
} from '@astryxdesign/interaction-harness';

Expand Down Expand Up @@ -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});
Expand Down
Loading