File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
pr-preview/pr-217/tests/unittest Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 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+ } ) ;
You can’t perform that action at this time.
0 commit comments