Skip to content

Commit 45637ec

Browse files
committed
add tests
1 parent eb4580e commit 45637ec

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { expect } from '@playwright/test';
2+
import { configs, test } from '@utils/test/playwright';
3+
4+
configs({ modes: ['md', 'ios', 'ionic-md'] }).forEach(({ config, screenshot, title }) => {
5+
test.describe(title('badge: hint'), () => {
6+
test('should not have visual regressions', async ({ page }) => {
7+
await page.goto('/src/components/badge/test/hint', config);
8+
9+
await page.setIonViewport();
10+
11+
await expect(page).toHaveScreenshot(screenshot(`badge-hint`));
12+
});
13+
});
14+
});
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<!DOCTYPE html>
2+
<html lang="en" dir="ltr">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<title>Badge - Hint</title>
6+
<meta
7+
name="viewport"
8+
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
9+
/>
10+
<link href="../../../../../css/ionic.bundle.css" rel="stylesheet" />
11+
<link href="../../../../../scripts/testing/styles.css" rel="stylesheet" />
12+
<script src="../../../../../scripts/testing/scripts.js"></script>
13+
<script nomodule src="../../../../../dist/ionic/ionic.js"></script>
14+
<script type="module" src="../../../../../dist/ionic/ionic.esm.js"></script>
15+
</head>
16+
17+
<body>
18+
<ion-app>
19+
<ion-header>
20+
<ion-toolbar>
21+
<ion-title>Badge - Hint</ion-title>
22+
</ion-toolbar>
23+
</ion-header>
24+
25+
<ion-content id="content">
26+
<ion-list>
27+
<ion-list-header>
28+
<ion-label> Badge Empty </ion-label>
29+
</ion-list-header>
30+
<ion-item>
31+
<ion-label>Badge small</ion-label>
32+
<ion-badge color="primary" size="small"></ion-badge>
33+
</ion-item>
34+
<ion-item>
35+
<ion-label>Badge Medium</ion-label>
36+
<ion-badge color="danger" size="medium"></ion-badge>
37+
</ion-item>
38+
<ion-item>
39+
<ion-label>Badge Large</ion-label>
40+
<ion-badge color="warning" size="large"></ion-badge>
41+
</ion-item>
42+
</ion-list>
43+
</ion-content>
44+
</ion-app>
45+
</body>
46+
</html>

0 commit comments

Comments
 (0)