From 545ad93858bb9aba65c91c2094e774dba2d3c5d1 Mon Sep 17 00:00:00 2001 From: Benny Powers Date: Mon, 20 May 2024 09:22:34 +0300 Subject: [PATCH] test(timestamp): ssr --- elements/pf-timestamp/test/pf-timestamp.e2e.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/elements/pf-timestamp/test/pf-timestamp.e2e.ts b/elements/pf-timestamp/test/pf-timestamp.e2e.ts index 9db32b9b47..52b290c6d2 100644 --- a/elements/pf-timestamp/test/pf-timestamp.e2e.ts +++ b/elements/pf-timestamp/test/pf-timestamp.e2e.ts @@ -1,5 +1,6 @@ import { test } from '@playwright/test'; import { PfeDemoPage } from '@patternfly/pfe-tools/test/playwright/PfeDemoPage.js'; +import { SSRPage } from '@patternfly/pfe-tools/test/playwright/SSRPage.js'; const tagName = 'pf-timestamp'; @@ -10,4 +11,16 @@ test.describe(tagName, () => { await page.$eval('#realtime', el => el.closest('section')?.remove()); await componentPage.snapshot(); }); + + test('ssr', async ({ browser }) => { + const fixture = new SSRPage({ + tagName, + browser, + demoDir: new URL('../demo/', import.meta.url), + importSpecifiers: [ + `@patternfly/elements/${tagName}/${tagName}.js`, + ], + }); + await fixture.snapshots(); + }); });