mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-07 15:09:30 +00:00
test(golden): добавляет средний фон батарей
Issue: #806 User-Visible: no Release: v1.80.0-beta.6
This commit is contained in:
@@ -895,6 +895,11 @@ export const GOLDEN_SCENARIOS = Object.freeze([
|
||||
id: `device-battery-board-${theme}`, fixture: 'visual', space: 'golden-battery', mode: 'view',
|
||||
batteryBoard: 'desktop', theme, viewport: { width: 1120, height: 1120 }, ...stage,
|
||||
})),
|
||||
// #806 AC1: an explicit neutral mid-tone plan surface. Theme is kept light
|
||||
// so this proves the shadow against a third background, not a third UI skin.
|
||||
{ id: 'device-battery-board-medium', fixture: 'visual', space: 'golden-battery', mode: 'view',
|
||||
batteryBoard: 'desktop', bgMode: 'static', bgColor: '#808080',
|
||||
theme: 'light', viewport: { width: 1120, height: 1120 }, ...stage },
|
||||
{ id: 'device-battery-mobile-dark', fixture: 'visual', space: 'golden-battery', mode: 'view',
|
||||
batteryBoard: 'mobile', theme: 'dark', viewport: { width: 390, height: 844 }, ...stage },
|
||||
// Real ZHA refresh + hover; differential raster controls prove natural
|
||||
|
||||
@@ -8,8 +8,10 @@ import { GOLDEN_SCENARIOS } from '../demo/golden/matrix.mjs';
|
||||
|
||||
test('#792 compact golden matrix contains all six size/theme variants and four states', () => {
|
||||
const boards = GOLDEN_SCENARIOS.filter((scenario) => scenario.batteryBoard);
|
||||
assert.equal(boards.length, 3);
|
||||
assert.deepEqual(boards.filter((scenario) => scenario.batteryBoard === 'desktop').map((scenario) => scenario.theme).sort(), ['dark', 'light']);
|
||||
assert.equal(boards.length, 4);
|
||||
assert.deepEqual(boards.filter((scenario) => scenario.batteryBoard === 'desktop')
|
||||
.map((scenario) => scenario.id).sort(),
|
||||
['device-battery-board-dark', 'device-battery-board-light', 'device-battery-board-medium']);
|
||||
for (const scenario of boards) {
|
||||
const samples = batteryBoardSamples(scenario.batteryBoard);
|
||||
assert.equal(new Set(samples.map((sample) => sample.id)).size, samples.length);
|
||||
@@ -37,6 +39,17 @@ test('#792 compact golden matrix contains all six size/theme variants and four s
|
||||
}
|
||||
});
|
||||
|
||||
test('#806 battery shadow matrix has an explicit neutral medium background witness', () => {
|
||||
const scene = GOLDEN_SCENARIOS.find((scenario) => scenario.id === 'device-battery-board-medium');
|
||||
assert.ok(scene);
|
||||
assert.equal(scene.theme, 'light');
|
||||
assert.equal(scene.bgMode, 'static');
|
||||
assert.equal(scene.bgColor, '#808080');
|
||||
const fixture = prepareGoldenFixture(scene);
|
||||
assert.equal(fixture.config.spaces[0].settings.bg_mode, 'static');
|
||||
assert.equal(fixture.config.spaces[0].settings.bg_color, '#808080');
|
||||
});
|
||||
|
||||
test('#792 golden MDI oracle pins the four owner-approved icons independently of product code', () => {
|
||||
assert.deepEqual(BATTERY_BOARD_ICONS, {
|
||||
normal: 'mdi:battery', warning: 'mdi:battery-30',
|
||||
|
||||
Reference in New Issue
Block a user