fix: resolve workbench final review findings
This commit is contained in:
@@ -24,3 +24,26 @@ test('login and project channel workbench flow', async ({ page }) => {
|
||||
await page.getByRole('button', { name: 'Ops Dashboard' }).click();
|
||||
await expect(page.getByText('Open external channel')).toBeVisible();
|
||||
});
|
||||
|
||||
test('mobile workbench keeps project navigation and inspector compact', async ({ page }) => {
|
||||
await page.setViewportSize({ width: 390, height: 844 });
|
||||
await page.goto('/');
|
||||
|
||||
await page.getByLabel('Server IP or domain').fill('localhost:8080');
|
||||
await page.getByLabel('Email or username').fill('david@example.com');
|
||||
await page.getByLabel('Password').fill('secret');
|
||||
await page.getByRole('button', { name: 'Log in' }).click();
|
||||
|
||||
const rail = page.getByLabel('Project list');
|
||||
const sidebar = page.getByLabel('Project channels');
|
||||
const stage = page.getByLabel('Channel content');
|
||||
const inspector = page.getByLabel('Object inspector');
|
||||
|
||||
await expect(rail).toHaveCSS('grid-auto-flow', 'column');
|
||||
await expect(rail).toHaveCSS('max-height', '76px');
|
||||
await expect(inspector).toHaveCSS('max-height', '288px');
|
||||
|
||||
const [sidebarBox, stageBox] = await Promise.all([sidebar.boundingBox(), stage.boundingBox()]);
|
||||
expect(sidebarBox?.y).toBeLessThan(stageBox?.y ?? 0);
|
||||
expect((stageBox?.y ?? 0) - (sidebarBox?.y ?? 0)).toBeLessThanOrEqual(248);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user