Skip to content

Commit

Permalink
test(badge): ssr
Browse files Browse the repository at this point in the history
  • Loading branch information
bennypowers committed May 19, 2024
1 parent 701d0d6 commit 87954bf
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
9 changes: 9 additions & 0 deletions elements/pf-badge/demo/ssr.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<pf-badge number="613">613</pf-badge>
<pf-badge number="7">7</pf-badge>
<pf-badge number="24">24</pf-badge>
<pf-badge number="240">240</pf-badge>
<pf-badge threshold="900" number="999">999</pf-badge>
<pf-badge state="unread" number="7">7</pf-badge>
<pf-badge state="unread" number="24">24</pf-badge>
<pf-badge state="unread" number="240">240</pf-badge>
<pf-badge state="unread" threshold="900" number="999">999</pf-badge>
16 changes: 16 additions & 0 deletions elements/pf-badge/test/pf-badge.ssr.ts
Original file line number Diff line number Diff line change
@@ -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();
});
});

0 comments on commit 87954bf

Please sign in to comment.