fix(ui): drop the caption from the /permission error text too
Review round: the no-caption rule the Agent Note states applied only to the success texts, leaving `permission · unknown permission preset "bogus" (…)`. The error text now reads `unknown preset "bogus" (…)` and its exact wording is pinned; the fixture mirror drops `JSON.stringify` for the host's own quoting so the two cannot drift on a quoted argument. The Note now states the line it draws: the rule bans a caption for the command's own value, not the vocabulary, so `/plan`'s `Plan mode off.` and `/goal`'s `Goal cleared.` conform as written — recorded with the broader name-ban as a rejected alternative. The web row assertions are scoped to the row so unrelated page text reading `permission` cannot satisfy them.
This commit is contained in:
@@ -163,9 +163,12 @@ describe('web e2e: seeded history renders through cold resume', () => {
|
||||
await page.getByRole('button', { name: 'Access mode, current: Danger Full Access' }).click()
|
||||
await page.getByRole('menuitem', { name: 'Workspace Write' }).click()
|
||||
await page.getByRole('button', { name: 'Access mode, current: Workspace Write' }).waitFor({ timeout: 10_000 })
|
||||
await expect.poll(() => page.getByText('preset workspace-write', { exact: true }).count(), { timeout: 10_000 }).toBe(1)
|
||||
expect(await page.getByText('permission', { exact: true }).count()).toBe(1)
|
||||
expect(await page.getByText('/permission workspace-write', { exact: true }).count()).toBe(0)
|
||||
// Scoped to the row itself, so unrelated page text that happens to read
|
||||
// `permission` (a future resident slash menu) cannot satisfy or break it.
|
||||
const row = page.locator('[data-variant="others"]').filter({ hasText: 'preset workspace-write' })
|
||||
await expect.poll(() => row.count(), { timeout: 10_000 }).toBe(1)
|
||||
expect(await row.getByText('permission', { exact: true }).count()).toBe(1)
|
||||
expect(await row.getByText('/permission workspace-write', { exact: true }).count()).toBe(0)
|
||||
const snapshot = (await captureStableAria(page, '[class*="centerCol"]', scaffold.workspaceCwd))
|
||||
.split(SEED_ID).join('{{seededId}}')
|
||||
await compareOrRefreshGolden(COMMAND_ROW_EXPECTED, snapshot, MODE)
|
||||
|
||||
Reference in New Issue
Block a user