mirror of
https://github.com/hanzo-apps/hanzo.ai.git
synced 2026-10-30 14:58:08 +00:00
Three gates named an incident rather than a behaviour: a locator that matched the rail's entry as well as the room's switch, a daemon CI does not run, and two marketing sentences the hero no longer says.
56 lines
2.4 KiB
TypeScript
56 lines
2.4 KiB
TypeScript
import { test, expect } from '@playwright/test'
|
|
import { serveExport } from './export'
|
|
import { signIn } from '../session'
|
|
|
|
/**
|
|
* THE BOARD ROOM OPENS ON THE BOARD, AND THE FOOT IS A SWITCH.
|
|
*
|
|
* The two readings of one set of cards — by column, and against the calendar —
|
|
* were held by a boolean per view, so the room opened on the planner while the
|
|
* foot lit Board, and Board's own control did nothing when pressed. The state
|
|
* is one value now, which is what makes "exactly one of them" a thing the room
|
|
* cannot get wrong.
|
|
*/
|
|
|
|
test.describe('board and planner', () => {
|
|
test('one reading is up, the foot says which, and both halves work', async ({ page }) => {
|
|
await signIn(page)
|
|
const site = await serveExport()
|
|
try {
|
|
await page.setViewportSize({ width: 1440, height: 900 })
|
|
await page.goto(`${site.url}/board`)
|
|
|
|
// SCOPED TO THE ROOM, because the rail names its entry 'Board' too. Signed
|
|
// in, the foot's switch and the rail's row both answer to the word and the
|
|
// locator resolved to two — a strict-mode violation that reads like the
|
|
// switch is missing. The rail row carries `aria-current`; this one carries
|
|
// `aria-pressed`, which is what the assertions below are about.
|
|
const board = page.locator('button[aria-pressed]').filter({ hasText: 'Board' })
|
|
const planner = page.locator('button[aria-pressed]').filter({ hasText: 'Planner' })
|
|
|
|
// The room is called Board, so it opens on one.
|
|
await expect(board).toHaveAttribute('aria-pressed', 'true', { timeout: 20000 })
|
|
await expect(planner).toHaveAttribute('aria-pressed', 'false')
|
|
|
|
// The other half is a control and not a label.
|
|
await planner.click()
|
|
await expect(planner).toHaveAttribute('aria-pressed', 'true')
|
|
await expect(board).toHaveAttribute('aria-pressed', 'false')
|
|
|
|
// And back, which is the half that used to do nothing.
|
|
await board.click()
|
|
await expect(board).toHaveAttribute('aria-pressed', 'true')
|
|
await expect(planner).toHaveAttribute('aria-pressed', 'false')
|
|
|
|
// The board renders the active columns and cards gracefully without breaking.
|
|
await expect(page.locator('main')).toContainText('Board', {
|
|
timeout: 20000,
|
|
})
|
|
await expect(page.getByText('Backlog', { exact: true })).toBeVisible()
|
|
await expect(page.getByText('Doing', { exact: true })).toBeVisible()
|
|
} finally {
|
|
await site.close()
|
|
}
|
|
})
|
|
})
|