File tree Expand file tree Collapse file tree 4 files changed +20
-22
lines changed
Expand file tree Collapse file tree 4 files changed +20
-22
lines changed Original file line number Diff line number Diff line change @@ -28,26 +28,26 @@ import { expect } from "@playwright/test";
2828test .describe (" Playwright VoiceOver" , () => {
2929 test (" I can navigate the Playwright website using VoiceOver" , async ({
3030 page ,
31- vo ,
31+ voiceOver ,
3232 }) => {
3333 // Navigate to Playwright website 🎉
3434 await page .goto (" https://playwright.dev/" , {
3535 waitUntil: " domcontentloaded" ,
3636 });
3737
3838 // Interact with the page 🙌
39- await vo .interact ();
39+ await voiceOver .interact ();
4040
4141 // Move across the navigation menu to the search bar using VoiceOver 🔎
42- while (! (await vo .lastSpokenPhrase ())?.startsWith (" Search" )) {
43- await vo .next ();
42+ while (! (await voiceOver .lastSpokenPhrase ())?.startsWith (" Search" )) {
43+ await voiceOver .next ();
4444 }
4545
4646 // Search for Safari 👀
47- await vo .type (" Safari" );
48- await vo .press (" ArrowDown" );
49- await vo .press (" ArrowUp" );
50- await Promise .all ([page .waitForNavigation (), vo .act ()]);
47+ await voiceOver .type (" Safari" );
48+ await voiceOver .press (" ArrowDown" );
49+ await voiceOver .press (" ArrowUp" );
50+ await Promise .all ([page .waitForNavigation (), voiceOver .act ()]);
5151 expect (page .url ()).toBe (" https://playwright.dev/docs/browsers#webkit" );
5252 });
5353});
Original file line number Diff line number Diff line change 11{
22 "name" : " @guidepup/playwright" ,
3- "version" : " 0.5 .0" ,
3+ "version" : " 0.6 .0" ,
44 "description" : " Screen-reader driver for Playwright." ,
55 "main" : " lib/index.js" ,
66 "typings" : " lib/index.d.ts" ,
3131 "prepublish" : " yarn build"
3232 },
3333 "dependencies" : {
34- "@guidepup/guidepup" : " ^0.12 .0"
34+ "@guidepup/guidepup" : " ^0.13 .0"
3535 },
3636 "devDependencies" : {
3737 "@playwright/test" : " ^1.17.1" ,
Original file line number Diff line number Diff line change 11/* eslint-disable no-empty-pattern */
22import { test } from "@playwright/test" ;
3- import { VoiceOver , macOSActivate } from "@guidepup/guidepup" ;
3+ import { voiceOver , macOSActivate } from "@guidepup/guidepup" ;
44
55const PLAYWRIGHT_APPLICATION = "Playwright" ;
66
@@ -10,16 +10,14 @@ const PLAYWRIGHT_APPLICATION = "Playwright";
1010 *
1111 * A fresh started VoiceOver instance `vo` is provided to each test.
1212 */
13- const voTest = test . extend < { vo : VoiceOver } > ( {
14- vo : async ( { } , use ) => {
15- const vo = new VoiceOver ( ) ;
16-
13+ const voTest = test . extend < { voiceOver } > ( {
14+ voiceOver : async ( { } , use ) => {
1715 try {
18- await vo . start ( ) ;
16+ await voiceOver . start ( ) ;
1917 await macOSActivate ( PLAYWRIGHT_APPLICATION ) ;
20- await use ( vo ) ;
18+ await use ( voiceOver ) ;
2119 } finally {
22- await vo . stop ( ) ;
20+ await voiceOver . stop ( ) ;
2321 }
2422 } ,
2523} ) ;
Original file line number Diff line number Diff line change 456456 minimatch "^3.0.4"
457457 strip-json-comments "^3.1.1"
458458
459- " @guidepup/guidepup@^0.12 .0 " :
460- version "0.12 .0"
461- resolved "https://registry.yarnpkg.com/@guidepup/guidepup/-/guidepup-0.12 .0.tgz#59602aab356464868e7eb9e4284c0ef3796de6b9 "
462- integrity sha512-bVMnLDaJoKdt+zy+g1+SOZx3Cw5DE8F1DAll+Kt9JQ2HnPgnSovmscmj1ofgeSxFXOoxjb0a90fzGhLyOeLOJQ ==
459+ " @guidepup/guidepup@^0.13 .0 " :
460+ version "0.13 .0"
461+ resolved "https://registry.yarnpkg.com/@guidepup/guidepup/-/guidepup-0.13 .0.tgz#7995ec599283d02a9532c9f79aca2ca3aa2e3c47 "
462+ integrity sha512-U56KXtxkyZa9m7q9l4et3AtkU+0Z+cYEnF4vA5ZgUbJCfQr66F2Rn04HPhIDDEZ/2PMYP5NsdDONSWu23ESQ4w ==
463463
464464" @humanwhocodes/config-array@^0.9.2 " :
465465 version "0.9.2"
You can’t perform that action at this time.
0 commit comments