diff --git a/src/__screenshot_tests__/__image_snapshots__/poster-card-screenshot-test-tsx-poster-card-with-custom-background-color-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/poster-card-screenshot-test-tsx-poster-card-with-custom-background-color-1-snap.png new file mode 100644 index 0000000000..4a4b3b92ad Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/poster-card-screenshot-test-tsx-poster-card-with-custom-background-color-1-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/poster-card-screenshot-test-tsx-poster-card-with-custom-background-color-inverse-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/poster-card-screenshot-test-tsx-poster-card-with-custom-background-color-inverse-1-snap.png new file mode 100644 index 0000000000..c6628e0b2b Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/poster-card-screenshot-test-tsx-poster-card-with-custom-background-color-inverse-1-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/poster-card-screenshot-test-tsx-poster-card-with-variant-alternative-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/poster-card-screenshot-test-tsx-poster-card-with-variant-alternative-1-snap.png new file mode 100644 index 0000000000..0db9acff89 Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/poster-card-screenshot-test-tsx-poster-card-with-variant-alternative-1-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/poster-card-screenshot-test-tsx-poster-card-with-variant-default-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/poster-card-screenshot-test-tsx-poster-card-with-variant-default-1-snap.png new file mode 100644 index 0000000000..b646a77653 Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/poster-card-screenshot-test-tsx-poster-card-with-variant-default-1-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/poster-card-screenshot-test-tsx-poster-card-with-variant-inverse-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/poster-card-screenshot-test-tsx-poster-card-with-variant-inverse-1-snap.png new file mode 100644 index 0000000000..8aefdd6a88 Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/poster-card-screenshot-test-tsx-poster-card-with-variant-inverse-1-snap.png differ diff --git a/src/__screenshot_tests__/poster-card-screenshot-test.tsx b/src/__screenshot_tests__/poster-card-screenshot-test.tsx index 52ed81cb83..f545b8212d 100644 --- a/src/__screenshot_tests__/poster-card-screenshot-test.tsx +++ b/src/__screenshot_tests__/poster-card-screenshot-test.tsx @@ -125,3 +125,42 @@ test.each(TESTABLE_DEVICES)('PosterCard with asset in %s', async (device) => { expect(image).toMatchImageSnapshot(); }); + +test.each(['inverse', 'alternative', 'default'])('PosterCard with variant %s', async (variant) => { + await openStoryPage({ + id: 'components-cards-poster-card--default', + args: {variant, background: 'color from skin'}, + }); + + const posterCard = await screen.findByTestId('main-poster-card'); + + const image = await posterCard.screenshot(); + + expect(image).toMatchImageSnapshot(); +}); + +test('PosterCard with custom background color', async () => { + await openStoryPage({ + id: 'components-cards-poster-card--default', + args: {background: 'custom color', backgroundColorCustom: '#ff0'}, + }); + + const posterCard = await screen.findByTestId('main-poster-card'); + + const image = await posterCard.screenshot(); + + expect(image).toMatchImageSnapshot(); +}); + +test('PosterCard with custom background color inverse', async () => { + await openStoryPage({ + id: 'components-cards-poster-card--default', + args: {background: 'custom color', backgroundColorCustom: '#000', variant: 'inverse'}, + }); + + const posterCard = await screen.findByTestId('main-poster-card'); + + const image = await posterCard.screenshot(); + + expect(image).toMatchImageSnapshot(); +}); diff --git a/src/__stories__/poster-card-story.tsx b/src/__stories__/poster-card-story.tsx index 300bd14e0a..704a844897 100644 --- a/src/__stories__/poster-card-story.tsx +++ b/src/__stories__/poster-card-story.tsx @@ -128,6 +128,7 @@ export const Default: StoryComponent = ({ return ( {headline} : undefined}