Add voice search and large-control Car mode

This commit is contained in:
Jonathan Sykes
2026-10-03 15:10:30 +08:00
parent 172e8231f0
commit 0b3e82a768
7 changed files with 50 additions and 0 deletions

View File

@@ -49,3 +49,10 @@ test('setlist import confirms library matches and retains key tags', async ({ pa
await page.getByRole('button', { name: 'Create setlist', exact: true }).click();
expect(await page.evaluate(() => data.playlists.at(-1).videos[0].tags)).toContain('Key E');
});
for (const layout of ['classic', 'glass-stage']) for (const width of [390, 1440]) test(`${layout} Car mode at ${width}px`, async ({ page }) => {
await page.setViewportSize({ width, height: 900 }); await openClassic(page); await page.evaluate(layout => { data.settings.layout = layout; applyAppearance(); CarMode.open(); }, layout);
await expect(page.getByRole('dialog', { name: 'Car mode' })).toBeVisible();
expect(await page.locator('.car-controls button').first().evaluate(el => el.getBoundingClientRect().height)).toBeGreaterThanOrEqual(100);
expect(await page.locator('.app').evaluate(el => el.inert)).toBe(true);
await page.getByRole('button', { name: 'Exit Car mode' }).click(); await expect(page.locator('.car-mode')).toHaveCount(0); expect(await page.locator('.app').evaluate(el => el.inert)).toBe(false);
});