diff --git a/apps/electron-backend-e2e/src/xtream-responsiveness.e2e.ts b/apps/electron-backend-e2e/src/xtream-responsiveness.e2e.ts index 1490bed99..2f0cc03f0 100644 --- a/apps/electron-backend-e2e/src/xtream-responsiveness.e2e.ts +++ b/apps/electron-backend-e2e/src/xtream-responsiveness.e2e.ts @@ -11,6 +11,7 @@ import { waitForXtreamCatalog, xtreamMockServer, } from './electron-test-fixtures'; +import { applyTheme } from './theme-contrast'; const stressPortalName = 'Stress Xtream Portal'; const stressXtreamUsername = 'stress'; @@ -304,7 +305,25 @@ test.describe('Electron Xtream Responsiveness', () => { await expect( playlistRow.locator('.busy-state__message') ).toBeVisible({ timeout: 20000 }); - await expect(playlistRow.locator('.cancel-btn')).toBeVisible(); + const cancel = playlistRow.locator('.cancel-btn'); + await expect(cancel).toBeVisible(); + // The row's action buttons inherit its color; the cancel action + // must still read as destructive on the selected row. + for (const theme of ['light', 'dark'] as const) { + await applyTheme(app.mainWindow, theme); + const error = await app.mainWindow.evaluate(() => { + const probe = document.createElement('div'); + probe.style.color = 'var(--mat-sys-error)'; + document.body.appendChild(probe); + const color = getComputedStyle(probe).color; + probe.remove(); + return color; + }); + expect( + await cancel.evaluate((el) => getComputedStyle(el).color), + `cancel color in ${theme} theme` + ).toBe(error); + } await waitForDbOperationEvent(app.mainWindow, { operation: 'delete-playlist', diff --git a/libs/playlist/shared/ui/src/lib/recent-playlists/playlist-item/playlist-item.component.scss b/libs/playlist/shared/ui/src/lib/recent-playlists/playlist-item/playlist-item.component.scss index b963935d6..76b9f77a4 100644 --- a/libs/playlist/shared/ui/src/lib/recent-playlists/playlist-item/playlist-item.component.scss +++ b/libs/playlist/shared/ui/src/lib/recent-playlists/playlist-item/playlist-item.component.scss @@ -189,6 +189,13 @@ } } +// The action buttons inherit the row color, including the selected row's, +// which masks the .app-destructive-button token on the cancel action. +.playlist-item .action-buttons .cancel-btn, +.playlist-item.selected .action-buttons .cancel-btn { + color: var(--mat-sys-error); +} + .action-spinner { display: block; margin: 0 auto;