Skip to content

Commit

Permalink
test(background-image): ssr
Browse files Browse the repository at this point in the history
  • Loading branch information
bennypowers committed May 19, 2024
1 parent 7853d57 commit 701d0d6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
7 changes: 7 additions & 0 deletions elements/pf-background-image/demo/ssr.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<pf-background-image filter
src="pfbg.jpg"
src-2x="pfbg_576.jpg"
src-sm="pfbg_768.jpg"
src-sm-2x="[email protected]"
src-lg="pfbg_1200.jpg"
></pf-background-image>
16 changes: 16 additions & 0 deletions elements/pf-background-image/test/pf-background-image.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-background-image';

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-background-image/pf-background-image.js',
],
});
await fixture.snapshot();
});
});

0 comments on commit 701d0d6

Please sign in to comment.