diff --git a/craft/scripts/e2e-sitesmith.mjs b/craft/scripts/e2e-sitesmith.mjs index ea9b9c4..739a405 100644 --- a/craft/scripts/e2e-sitesmith.mjs +++ b/craft/scripts/e2e-sitesmith.mjs @@ -317,8 +317,8 @@ scenario('9', 'Clear chat: confirm clears the history (and stays cleared after r await page.waitForFunction(() => (document.querySelector('[role=dialog]')?.textContent ?? '').includes('Please remember this line'), null, { timeout: 15000 }); await page.waitForSelector('[role=dialog] button:has-text("Clear chat")', { timeout: 10000 }); await page.click('[role=dialog] button:has-text("Clear chat")'); - ok('first click asks for confirmation (no request yet)', (await dlg.locator('button:has-text("Confirm clear?")').count()) === 1 && srv.clearCalls.length === 0, String(srv.clearCalls.length)); - await page.click('[role=dialog] button:has-text("Confirm clear?")'); + ok('first click asks for confirmation (no request yet)', (await dlg.locator('button:has-text("Clear for everyone on this site?")').count()) === 1 && srv.clearCalls.length === 0, String(srv.clearCalls.length)); + await page.click('[role=dialog] button:has-text("Clear for everyone on this site?")'); await page.waitForFunction(() => !(document.querySelector('[role=dialog]')?.textContent ?? '').includes('Please remember this line'), null, { timeout: 10000 }).catch(() => {}); const txt = (await dlg.textContent()) ?? ''; ok('confirm sends exactly one clear_history', srv.clearCalls.length === 1, String(srv.clearCalls.length)); @@ -340,7 +340,7 @@ scenario('9b', 'Clear chat while a job is running: a plain message, nothing lost srv.setActiveJob({ phase: 'generating' }); srv.setSlow(true); await page.click('[role=dialog] button:has-text("Clear chat")'); - await page.click('[role=dialog] button:has-text("Confirm clear?")'); + await page.click('[role=dialog] button:has-text("Clear for everyone on this site?")'); await page.waitForSelector('[data-testid=ss-error]', { timeout: 10000 }); const err = (await page.textContent('[data-testid=ss-error]')) ?? ''; ok('the refusal is a readable sentence, not an error code', /still working/i.test(err) && !/job_in_progress/.test(err), err);