test(dashboard): qualify responsive layout and preview semantics

This commit is contained in:
cesnimda
2026-10-21 21:21:22 +02:00
parent 77968da90c
commit 9604589785
8 changed files with 491 additions and 12 deletions
@@ -31,6 +31,7 @@ async function edit() { fireEvent.click(await screen.findByRole('button', { name
test('visibility is a preview; cancel restores the saved layout without a write', async () => {
open(); await screen.findByText('Tracked jobs');
const editor = await edit(); fireEvent.click(within(editor).getByRole('checkbox', { name: 'Summary cards' }));
expect(screen.getByRole('region', { name: 'Dashboard preview' })).toBeInTheDocument();
expect(screen.queryByText('Tracked jobs')).not.toBeInTheDocument();
fireEvent.click(within(editor).getByRole('button', { name: 'Cancel' }));
const dialog = await screen.findByRole('dialog'); fireEvent.click(within(dialog).getByRole('button', { name: 'Discard changes' }));