veritas-kanban/e2e/task-detail-scroll-regression.spec.ts
Brad Groux 2cfb89396d
chore(release): prepare Veritas Kanban 6.1.1
Audit and resolve the open contributor and dependency backlog, stabilize the release candidate, synchronize versioned documentation, and prepare the verified 6.1.1 release.
2026-08-22 19:55:58 -05:00

46 lines
1.6 KiB
TypeScript

import { test, expect } from '@playwright/test';
import { bypassAuth, cleanupRoutes, deleteTask, seedTestTask } from './helpers/auth';
test('long task detail content remains constrained and scrollable', async ({ page }) => {
await bypassAuth(page);
const task = await seedTestTask(page, {
title: 'E2E Scroll Regression Task',
description: Array.from(
{ length: 120 },
(_, index) => `Scroll regression paragraph ${index + 1}`
).join('\n\n'),
status: 'todo',
});
try {
await page.goto('/');
await page.getByText('E2E Scroll Regression Task').first().click();
const detailPanel = page.getByRole('dialog');
const tabsRoot = detailPanel.locator('.mantine-Tabs-root').first();
const scrollPanel = detailPanel.locator('.veritas-overlay-scroll').first();
await expect(tabsRoot).toHaveCSS('display', 'flex');
await expect(tabsRoot).toHaveCSS('flex-direction', 'column');
const dimensions = await scrollPanel.evaluate((element) => ({
clientHeight: element.clientHeight,
scrollHeight: element.scrollHeight,
}));
expect(dimensions.clientHeight).toBeLessThan(dimensions.scrollHeight);
const scrollBox = await scrollPanel.boundingBox();
expect(scrollBox).not.toBeNull();
await page.mouse.move(
scrollBox!.x + scrollBox!.width - 4,
scrollBox!.y + scrollBox!.height / 2
);
await page.mouse.wheel(0, 600);
await expect
.poll(() => scrollPanel.evaluate((element) => element.scrollTop))
.toBeGreaterThan(0);
} finally {
await deleteTask(page, (task as { id: string }).id).catch(() => {});
await cleanupRoutes(page);
}
});