From 3a6bd88e723d284d51ffc538937c96b090bcfe35 Mon Sep 17 00:00:00 2001 From: Davide Mininni Date: Mon, 9 Sep 2024 14:56:43 +0200 Subject: [PATCH] fix: review --- .../header/header/header.visual.spec.ts | 6 +++++- src/elements/signet/signet.ts | 2 +- src/elements/signet/signet.visual.spec.ts | 17 ++++++++++------- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/elements/header/header/header.visual.spec.ts b/src/elements/header/header/header.visual.spec.ts index b823ac0d68..559bbb88a6 100644 --- a/src/elements/header/header/header.visual.spec.ts +++ b/src/elements/header/header/header.visual.spec.ts @@ -1,4 +1,4 @@ -import { html, type TemplateResult } from 'lit'; +import { html, nothing, type TemplateResult } from 'lit'; import { describeViewports, visualDiffDefault } from '../../core/testing/private.js'; @@ -6,6 +6,7 @@ import './header.js'; import '../header-link.js'; import '../header-button.js'; import '../../menu.js'; +import '../../signet.js'; describe(`sbb-header`, () => { const loremIpsumTemplate = ` @@ -37,6 +38,9 @@ describe(`sbb-header`, () => { Christina Müller English + ${size === 's' + ? html`` + : nothing}
${loremIpsumTemplate} diff --git a/src/elements/signet/signet.ts b/src/elements/signet/signet.ts index ee81cb0dcc..1763763a1a 100644 --- a/src/elements/signet/signet.ts +++ b/src/elements/signet/signet.ts @@ -33,7 +33,7 @@ export class SbbSignetElement extends LitElement { ? html` - + { - const protectiveRooms = ['none', 'minimal', 'ideal']; + const cases = { + protectiveRooms: ['none', 'minimal', 'ideal'], + forcedColors: [false, true], + }; describeViewports({ viewports: ['zero'] }, () => { - for (const protectiveRoom of protectiveRooms) { + describeEach(cases, ({ protectiveRooms, forcedColors }) => { it( - `protectiveRoom=${protectiveRoom}`, + ``, visualDiffDefault.with(async (setup) => { await setup.withFixture( - html``, - { padding: '0', maxWidth: '300px' }, + html``, + { padding: '0', maxWidth: '300px', forcedColors }, ); }), ); - } + }); }); });