feat: articles list screen

This commit is contained in:
fsylvain committed 2026-09-27 17:12:23 +02:00
1 parent ca3fe20519
commit f6d0d01092
14 files changed
+2353 -25

No files matched your search

+15 -1
View File
@@ -311,7 +311,21 @@ async function captureApp(
await page.clock.install({ time })
await page.clock.pauseAt(time)
} else if (setup.now) {
await page.clock.setFixedTime(new Date(setup.now))
await page.addInitScript((iso) => {
const anchorTime = new Date(iso).getTime()
const RealDate = Date
const realNow = RealDate.now()
function currentTime() {
return anchorTime + (RealDate.now() - realNow)
}
function TickingDate(...args: unknown[]) {
const dateArgs = args as ConstructorParameters<typeof Date>
return args.length === 0 ? new RealDate(currentTime()) : new RealDate(...dateArgs)
}
TickingDate.prototype = RealDate.prototype
TickingDate.now = currentTime
globalThis.Date = TickingDate as unknown as DateConstructor
}, setup.now)
}
await page.goto(`${origin}${setup.path}`)
await Promise.race([page.waitForLoadState('networkidle'), page.waitForTimeout(2000)])