feat(KB-164): fix mobile board double scrollbar with flex layout
- Switch board from 5-column grid to horizontally-scrollable flex layout on viewports ≤768px - Add snap-scrolling and fixed min-width columns for polished mobile swipe - Prevent ancestor elements (html, body, #root) from producing a second scrollbar - Add board structure tests verifying columns are direct children of main element - Add changeset for the mobile board fix (patch)
This commit is contained in:
@@ -52,4 +52,23 @@ describe("Board", () => {
|
||||
expect(screen.getByTestId(`column-${col}`)).toBeDefined();
|
||||
}
|
||||
});
|
||||
|
||||
it("renders all 5 columns as direct children of .board (CSS selector target)", () => {
|
||||
renderBoard();
|
||||
const board = screen.getByRole("main");
|
||||
// The mock Column renders <div data-testid="column-{col}" />, which are direct children
|
||||
const directChildren = Array.from(board.children);
|
||||
expect(directChildren).toHaveLength(COLUMNS.length);
|
||||
// Each direct child should be one of the column test-id elements
|
||||
for (const col of COLUMNS) {
|
||||
const colEl = screen.getByTestId(`column-${col}`);
|
||||
expect(colEl.parentElement).toBe(board);
|
||||
}
|
||||
});
|
||||
|
||||
it("renders the board element as a <main> tag (semantic structure)", () => {
|
||||
renderBoard();
|
||||
const board = screen.getByRole("main");
|
||||
expect(board.tagName).toBe("MAIN");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user