tests: accept built-in badge

This commit is contained in:
leora 2026-10-08 19:41:14 +08:00
parent 9853c39ef0
commit 2fdd46af9d

View File

@ -16,7 +16,7 @@ const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
await page.waitForSelector(".card", { timeout: 15000 }); await page.waitForSelector(".card", { timeout: 15000 });
check("landing renders agent-chosen cards", (await page.$$(".card")).length >= 4); check("landing renders agent-chosen cards", (await page.$$(".card")).length >= 4);
const badge = await page.$eval("#agentBadge", (n) => n.textContent); const badge = await page.$eval("#agentBadge", (n) => n.textContent);
check("agent mode badge shown", /fallback|AI:|LLM/.test(badge), badge); check("agent mode badge shown", /fallback|built-in|AI:|LLM/.test(badge), badge);
// ask(): type into the chat popup and wait for the agent's reply (LLM replies take a few seconds) // ask(): type into the chat popup and wait for the agent's reply (LLM replies take a few seconds)
const ask = async (text) => { const ask = async (text) => {