Skip to content
Merged
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
19 changes: 19 additions & 0 deletions apps/desktop/e2e/transcript-scroll.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,25 @@ test('history asked for at the very top of the scroller still lands above the re
.getAttribute('data-transcript-turn-id');
const firstBefore = await firstLoadedTurn();

// The fixture is ready when the transcript exists, before its initial tail
// positioning necessarily completes. Writing zero while it is still at zero
// is a no-op, so no reader scroll event asks for earlier history. Require one
// geometry sample to prove both that the initial pin moved and where it
// landed before exercising the real move to the top.
await expect.poll(async () => {
const metrics = await scrollMetrics(page);
return {
positionedAwayFromStart: metrics.scrollTop > 0,
settledAtTail: metrics.distance <= 4,
metrics,
};
}, {
message: 'the initial transcript tail positioning settles',
}).toMatchObject({
positionedAwayFromStart: true,
settledAtTail: true,
});

// The one position where the browser declines to anchor, and the one the
// wheel-to-load path puts the reader in.
await page.evaluate((selector) => {
Expand Down