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
7 changes: 6 additions & 1 deletion scripts/ui-gate/shots.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,12 @@ async function hostCopy(p, locator) {
}

async function page(browser, themeName, { width, height }) {
const p = await browser.newPage({ viewport: { width, height } });
// The gate's literal expectations — a cost of "$0.42", "50K" tokens — are
// what en-US renders, so the page's locale is pinned rather than left to
// whatever locale the machine running the gate resolves (en-CA says
// "US$0.42", which would fail checks no code changed). A date read-out is
// never pinned this way: a scenario asks the page itself what it says.
const p = await browser.newPage({ locale: "en-US", viewport: { width, height } });
p.on("pageerror", (e) => {
// fixture pages must render clean — a page error is itself a failure
console.log(`FAIL [${themeName}] pageerror: ${String(e).slice(0, 200)}`);
Expand Down
Loading