feat: harden kanban responsiveness and visual system
This commit is contained in:
parent
ce2010fd92
commit
75cc86e259
14 changed files with 239 additions and 55 deletions
31
tests/guards/kanban-responsive-contract.test.mjs
Normal file
31
tests/guards/kanban-responsive-contract.test.mjs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import fs from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
|
||||
const ROOT = process.cwd();
|
||||
|
||||
async function read(relativePath) {
|
||||
return fs.readFile(path.join(ROOT, relativePath), 'utf8');
|
||||
}
|
||||
|
||||
test('kanban board uses intentional horizontal scroll affordances', async () => {
|
||||
const board = await read('src/components/kanban/kanban-board.tsx');
|
||||
|
||||
assert.match(board, /snap-x/);
|
||||
assert.match(board, /overflow-x-auto/);
|
||||
});
|
||||
|
||||
test('kanban page defines mobile detail drawer behavior', async () => {
|
||||
const page = await read('src/components/kanban/kanban-page.tsx');
|
||||
|
||||
assert.match(page, /fixed inset-0/);
|
||||
assert.match(page, /lg:hidden/);
|
||||
});
|
||||
|
||||
test('kanban controls use fluid full-width sizing on small viewports', async () => {
|
||||
const controls = await read('src/components/kanban/kanban-controls.tsx');
|
||||
|
||||
assert.match(controls, /w-full/);
|
||||
assert.match(controls, /sm:w-/);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue