test: Add browser tests for the media viewing gallery and viewer (#2661)
This commit is contained in:
@@ -1,17 +1,21 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import type { ThemeName } from '../../src/config/schema/view';
|
||||
import { MountedCardFactory } from '../browser/mounted-card';
|
||||
import { createCameraHASS, createStillImageCardConfig } from '../browser/test-utils';
|
||||
import {
|
||||
createGenericCameraHASS,
|
||||
createStillImageCardConfig,
|
||||
} from '../browser/test-utils';
|
||||
|
||||
// A colour the dark theme sets and the card carries no other way. Reading it
|
||||
// back proves the stylesheet reached the card rather than merely compiling.
|
||||
// See src/scss/themes/dark.scss .
|
||||
const DARK_PRIMARY_BACKGROUND = '#111111';
|
||||
|
||||
const mountThemed = async (themes: string[]) =>
|
||||
const mountThemed = async (themes: ThemeName[]) =>
|
||||
await MountedCardFactory.createFromSource(
|
||||
createStillImageCardConfig({ view: { theme: { themes } } }),
|
||||
createCameraHASS(),
|
||||
createGenericCameraHASS(),
|
||||
);
|
||||
|
||||
describe('themes', () => {
|
||||
|
||||
Reference in New Issue
Block a user