Skip to content

Commit 7dff669

Browse files
Deploy preview for PR 217 🛫
1 parent e34822f commit 7dff669

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { test, expect } from '@playwright/test';
2+
3+
/*
4+
1. Test the Read Driver's License page should have the correct header.
5+
2. Test the Read Driver's License page should have the correct heading.
6+
*/
7+
8+
const URL = '/use-case/read-a-drivers-license/index.html';
9+
10+
test.beforeEach(async ({ page }) => {
11+
await page.goto(URL);
12+
});
13+
14+
test('should have correct title', async ({ page }) => {
15+
const title = await page.title();
16+
expect(title).toBe("Dynamsoft Barcode Reader Sample - Read a Driver's License");
17+
});
18+
19+
test('should have main heading', async ({ page }) => {
20+
const h1 = await page.locator('h1');
21+
expect(h1).not.toBeNull();
22+
await expect(h1).toHaveText("Read a Driver's License");
23+
});

0 commit comments

Comments
 (0)