feat: introduce the compact vehicle HUD
This commit is contained in:
@@ -81,10 +81,13 @@ test('keeps a scrolled content panel in a geometry-safe paint layer above the wo
|
||||
test('provides native motion and quality controls with visible state', async ({ page, distUrl }) => {
|
||||
await page.goto(distUrl, { waitUntil: 'domcontentloaded' });
|
||||
|
||||
await page.getByRole('button', { name: 'Drive settings' }).click();
|
||||
const quality = page.getByLabel('Quality control');
|
||||
await expect(quality).toBeVisible();
|
||||
await expect(page.getByRole('status')).toHaveCount(0);
|
||||
await page.keyboard.press('Escape');
|
||||
await page.getByRole('button', { name: 'Start the drive' }).click();
|
||||
await expect(page.getByRole('button', { name: 'Pause motion' })).toBeVisible();
|
||||
await expect(page.getByRole('status')).toContainText('Motion:');
|
||||
const canvas = page.locator('.journey-canvas');
|
||||
const originalCanvas = await canvas.elementHandle();
|
||||
const originalGeneration = await page.locator('.journey-world').getAttribute('data-scene-generation');
|
||||
@@ -101,7 +104,8 @@ test('provides native motion and quality controls with visible state', async ({
|
||||
await expect(page.locator('.journey-world')).toHaveAttribute('data-scene-generation', originalGeneration ?? '');
|
||||
expect(await originalCanvas?.evaluate((element) => element.isConnected)).toBe(true);
|
||||
|
||||
await quality.selectOption('static');
|
||||
await page.getByRole('button', { name: 'Drive settings' }).click();
|
||||
await page.getByLabel('Quality control').selectOption('static');
|
||||
await expect(page.getByRole('button', { name: 'Enable motion' })).toBeVisible();
|
||||
await expect(page.locator('.journey-canvas')).toHaveCount(0);
|
||||
await expect(page.getByRole('status')).toContainText('Motion: static');
|
||||
@@ -112,6 +116,7 @@ test('never creates a canvas when the system requests reduced motion', async ({
|
||||
await page.goto(distUrl, { waitUntil: 'domcontentloaded' });
|
||||
|
||||
await expect(page.locator('.journey-canvas')).toHaveCount(0);
|
||||
await page.getByRole('button', { name: 'Drive settings' }).click();
|
||||
await expect(page.getByRole('status')).toContainText('reduced motion requested');
|
||||
await expect(page.getByLabel('Quality control')).toBeVisible();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user