File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ npm run test
12
12
13
13
## Test flow
14
14
15
- 1 . The test launches Safari using Playwright
15
+ 1 . The test launches the browser using Playwright
16
16
2 . Navigates to the GitHub website
17
17
3 . Moves through the website using VoiceOver controlled by Guidepup
18
18
4 . Traverses headings until the Guidepup heading in the README.md is found
Original file line number Diff line number Diff line change 1
- import { expect } from "@playwright/test" ;
1
+ import type { VoiceOver } from "@guidepup/guidepup" ;
2
+ import { expect , Page } from "@playwright/test" ;
2
3
3
4
async function delay ( ms : number ) {
4
5
return new Promise ( resolve => setTimeout ( resolve , ms ) ) ;
5
6
}
6
7
7
- export async function headerNavigation ( { page, voiceOver } ) {
8
+ export async function headerNavigation ( { page, voiceOver } : { page : Page , voiceOver : VoiceOver } ) {
8
9
// Navigate to Guidepup GitHub page 🎉
9
10
await page . goto ( "https://github.com/guidepup/guidepup" , {
10
11
waitUntil : "domcontentloaded" ,
@@ -18,6 +19,6 @@ export async function headerNavigation({ page, voiceOver }) {
18
19
19
20
// Move across the page menu to the Guidepup heading using VoiceOver 🔎
20
21
while ( ( await voiceOver . itemText ( ) ) !== "Guidepup heading level 1" ) {
21
- await voiceOver . perform ( voiceOver . keyboard . commands . findNextHeading ) ;
22
+ await voiceOver . perform ( voiceOver . keyboardCommands . findNextHeading ) ;
22
23
}
23
24
}
Original file line number Diff line number Diff line change 1
1
import { test } from "@playwright/test" ;
2
2
import { voiceOver , macOSActivate } from "@guidepup/guidepup" ;
3
+ import type { VoiceOver } from "@guidepup/guidepup" ;
3
4
4
5
const applicationNameMap = {
5
6
chromium : "Chromium" ,
@@ -18,7 +19,7 @@ const applicationNameMap = {
18
19
*
19
20
* A fresh started VoiceOver instance `vo` is provided to each test.
20
21
*/
21
- const voTest = test . extend < { voiceOver : typeof voiceOver } > ( {
22
+ const voTest = test . extend < { voiceOver : VoiceOver } > ( {
22
23
voiceOver : async ( { browserName } , use ) => {
23
24
try {
24
25
await voiceOver . start ( ) ;
You can’t perform that action at this time.
0 commit comments