Skip to content

Commit

Permalink
test(timestamp): ssr
Browse files Browse the repository at this point in the history
  • Loading branch information
bennypowers committed May 20, 2024
1 parent 8edadbc commit 545ad93
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions elements/pf-timestamp/test/pf-timestamp.e2e.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand All @@ -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();
});
});

0 comments on commit 545ad93

Please sign in to comment.