docs(alpha): simplify native setup and verify generic starter creation

This commit is contained in:
2026-10-20 21:42:34 +01:00
parent dce2d759d7
commit a40898f79a
10 changed files with 272 additions and 529 deletions
+13
View File
@@ -1453,6 +1453,19 @@ async function runScratchCreate() {
await ensureConnected();
await openTemplates();
await page.waitForSelector(".cards button.card", { timeout: 25000 });
const starterKeys = await page.evaluate(`Array.from(document.querySelectorAll('[data-template-key]'), node => node.dataset.templateKey)`);
for (const key of ["task", "research", "summarize", "compare", "plan", "three-stage", "review", "debug"]) {
if (!starterKeys.includes(key)) throw new Error(`Missing alpha starter ${key}`);
}
await shot("54-alpha-starter-gallery-desktop.png");
await page.resize(390, 844);
await settle();
if (await page.evaluate("document.documentElement.scrollWidth > innerWidth")) throw new Error("Starter gallery overflows at 390px");
const clipped = await page.evaluate(`Array.from(document.querySelectorAll('[data-template-key]')).filter(card => card.querySelector('.card-meta')?.getBoundingClientRect().bottom > card.getBoundingClientRect().bottom).map(card => card.dataset.templateKey)`);
if (clipped.length) throw new Error(`Starter metadata outside cards: ${clipped.join(", ")}`);
await shot("55-alpha-starter-gallery-mobile.png");
await page.resize(1440, 900);
await settle();
await page.click(".cards button.card");
await page.waitForSelector("#detailTitle", { timeout: 25000 });
await page.waitForSelector(".template-create-open", { timeout: 15000 });