test(web): correct the steering dock comment on hidden rows

The collapsed dock renders the count header and no rows at all; Playwright text
matching does match elements inside a hidden list. State what the assertion
actually relies on.
This commit is contained in:
Chinesezjc committed 2026-09-29 12:58:03 +08:00
1 parent 2db8206953
commit 9ed5d6db5f
1 file changed
+5 -5
+5 -5
View File
@@ -458,11 +458,11 @@ describe('web e2e: empty-draft Cmd+Enter steers the whole queue', () => {
await input.fill(STEER_TWO)
await input.press('Enter')
const dock = page.locator('[data-queue-dock]')
// Both messages queued: the two-row dock shows a collapsed count header,
// and Playwright text matching skips the hidden rows — expand the list,
// then assert each row's content. Target the header by its accessible name:
// every visible row renders its own Edit/Remove/Steer buttons, so a bare
// button role query also matches those while a row is rendered.
// Both messages queued: the two-row dock is collapsed, so it renders the
// count header and no rows. Expand it through the header, then assert each
// row's content. Target the header by its accessible name: every visible row
// renders its own Edit/Remove/Steer buttons, so a bare button role query also
// matches those while a row is rendered.
const queueHeader = dock.getByRole('button', { name: '2 queued messages' })
await queueHeader.waitFor({ timeout: 10_000 })
await expect.poll(() => queueHeader.getAttribute('aria-expanded'), { timeout: 10_000 }).toBe('false')