Skip to content

Commit 9425c38

Browse files
committed
chore: add test for SVGs
1 parent a15ac5c commit 9425c38

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

packages/enhanced-img/test/apps/basics/src/routes/+page.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
import logo from './logo.png?enhanced';
33
</script>
44

5+
<enhanced:img id="playwright" src="./playwright-logo.svg" alt="Playwright logo" />
56
<enhanced:img id="birds" src="./birds.jpg" alt="birds" />
67
<enhanced:img id="logo" src={logo} alt="Svelte logo" />
Lines changed: 9 additions & 0 deletions
Loading

packages/enhanced-img/test/apps/basics/test/test.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ test('images are properly rendered', async ({ page }) => {
77
await expect(birdsImg).toBeVisible();
88
await expect(birdsImg).toHaveAttribute('alt', 'birds');
99

10-
// const logoImg = page.locator('#logo');
11-
// await expect(logoImg).toBeVisible();
12-
// await expect(logoImg).toHaveAttribute('alt', 'Svelte logo');
10+
const logoImg = page.locator('#logo');
11+
await expect(logoImg).toBeVisible();
12+
await expect(logoImg).toHaveAttribute('alt', 'Svelte logo');
13+
14+
const playwrightImg = page.locator('#playwright');
15+
await expect(playwrightImg).toBeVisible();
16+
await expect(playwrightImg).toHaveAttribute('alt', 'Playwright logo');
1317
});

0 commit comments

Comments
 (0)