From 87954bf521e0dfc989138b950559fcd36abd177d Mon Sep 17 00:00:00 2001 From: Benny Powers Date: Sun, 19 May 2024 16:05:23 +0300 Subject: [PATCH] test(badge): ssr --- elements/pf-badge/demo/ssr.html | 9 +++++++++ elements/pf-badge/test/pf-badge.ssr.ts | 16 ++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 elements/pf-badge/demo/ssr.html create mode 100644 elements/pf-badge/test/pf-badge.ssr.ts diff --git a/elements/pf-badge/demo/ssr.html b/elements/pf-badge/demo/ssr.html new file mode 100644 index 0000000000..9e84f9801d --- /dev/null +++ b/elements/pf-badge/demo/ssr.html @@ -0,0 +1,9 @@ +613 +7 +24 +240 +999 +7 +24 +240 +999 diff --git a/elements/pf-badge/test/pf-badge.ssr.ts b/elements/pf-badge/test/pf-badge.ssr.ts new file mode 100644 index 0000000000..4a60971e8b --- /dev/null +++ b/elements/pf-badge/test/pf-badge.ssr.ts @@ -0,0 +1,16 @@ +import { SSRPage } from '@patternfly/pfe-tools/test/playwright/SSRPage.js'; +import { test } from '@playwright/test'; + +const tagName = 'pf-badge'; + +test.describe(tagName, () => { + test('ssr', async ({ page }) => { + const fixture = new SSRPage(tagName, page, { + demoURL: new URL('../demo/ssr.html', import.meta.url), + importSpecifiers: [ + '@patternfly/elements/pf-badge/pf-badge.js', + ], + }); + await fixture.snapshot(); + }); +});