From 28ece6f51435fe5f8d70fe2b35db11ff4427af98 Mon Sep 17 00:00:00 2001 From: 4gray Date: Sat, 5 Sep 2026 13:57:46 +0200 Subject: [PATCH] test(playback): verify active recording icon theme --- .../src/player-theme.e2e.ts | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/apps/electron-backend-e2e/src/player-theme.e2e.ts b/apps/electron-backend-e2e/src/player-theme.e2e.ts index dbba32ccc..d7df3f324 100644 --- a/apps/electron-backend-e2e/src/player-theme.e2e.ts +++ b/apps/electron-backend-e2e/src/player-theme.e2e.ts @@ -199,6 +199,39 @@ for (const engine of [ } if (engine === 'native') { await expectThemeSurface(controls, theme); + const record = controls.locator( + '.embedded-mpv-player__record-button' + ); + await expect(record).toBeVisible(); + // Recording behavior has its own IPC coverage; exercise + // the state class here without creating a recording file. + await record.evaluate((element) => + element.classList.add( + 'embedded-mpv-player__record-button--active' + ) + ); + const liveColor = await record.evaluate((element) => + getComputedStyle(element) + .getPropertyValue('--app-live-color') + .trim() + ); + await expect(record.locator('mat-icon')).toHaveCSS( + 'color', + await record.evaluate((element, color) => { + const probe = document.createElement('span'); + probe.style.color = color; + element.append(probe); + const resolved = getComputedStyle(probe).color; + probe.remove(); + return resolved; + }, liveColor) + ); + await expectTextContrast(record, 3); + await record.evaluate((element) => + element.classList.remove( + 'embedded-mpv-player__record-button--active' + ) + ); await expect(play).toHaveCSS('outline-width', '2px'); const disabled = controls .locator(