Skip to content

Commit

Permalink
fix: visual tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dauriamarco committed Aug 16, 2024
1 parent c9dfef1 commit d667dfe
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/elements/flip-card/flip-card/flip-card.visual.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ const content = (
title: string = 'Summary',
imageAlignment: SbbFlipCardImageAlignment = 'after',
longContent: boolean = false,
flipped = false,
): TemplateResult =>
html`<sbb-flip-card-summary image-alignment=${imageAlignment}>
<sbb-title level="4">${title}</sbb-title>
<sbb-image slot="image" image-src=${imageUrl}></sbb-image>
</sbb-flip-card-summary>
<sbb-flip-card-details>
<sbb-flip-card-details ?data-flipped=${flipped}>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam luctus ornare condimentum.
Vivamus turpis elit, dapibus eget fringilla pellentesque, lobortis in nibh.
${longContent
Expand Down Expand Up @@ -66,7 +67,11 @@ describe(`sbb-flip-card`, () => {
it(
'flipped',
visualDiffDefault.with(async (setup) => {
await setup.withFixture(html`<sbb-flip-card data-flipped> ${content()}</sbb-flip-card>`);
await setup.withFixture(
html`<sbb-flip-card data-flipped>
${content('Summary', 'after', false, true)}</sbb-flip-card
>`,
);
await waitForImageReady(setup.snapshotElement.querySelector('sbb-image')!);
}),
);
Expand Down

0 comments on commit d667dfe

Please sign in to comment.