@guidepup/playwright 0.2.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -11,7 +11,7 @@
11
11
  Providing a reliable set of APIs to automate your screen-reader a11y workflows in Playwright.
12
12
  </p>
13
13
 
14
- ## Getting Started
14
+ ## Getting Started 🦮
15
15
 
16
16
  Install `@guidepup/playwright` to your project:
17
17
 
@@ -36,22 +36,24 @@ test.describe("Playwright VoiceOver", () => {
36
36
  });
37
37
 
38
38
  // Interact with the page 🙌
39
- await vo.commandInteractWithItem();
39
+ await vo.interact();
40
40
 
41
41
  // Move across the navigation menu to the search bar using VoiceOver 🔎
42
- while (!(await vo.getLastSpokenPhrase())?.startsWith("Search")) {
43
- await vo.moveNext();
42
+ while (!(await vo.lastSpokenPhrase())?.startsWith("Search")) {
43
+ await vo.next();
44
44
  }
45
45
 
46
46
  // Search for Safari 👀
47
- await page.keyboard.type("Safari");
48
- await vo.performAction();
47
+ await vo.type("Safari");
48
+ await vo.press("ArrowDown");
49
+ await vo.press("ArrowUp");
50
+ await Promise.all([page.waitForNavigation(), vo.act()]);
49
51
  expect(page.url()).toBe("https://playwright.dev/docs/browsers#webkit");
50
52
  });
51
53
  });
52
54
  ```
53
55
 
54
- ## Playwright Config
56
+ ## Playwright Config 🐕‍🦺
55
57
 
56
58
  In your `playwright.config.ts` add the following for the best results with
57
59
  Guidepup for VoiceOver automation. 💥
@@ -69,14 +71,29 @@ const config: PlaywrightTestConfig = {
69
71
  export default config;
70
72
  ```
71
73
 
72
- Check out the configuration this adds [here](./src/voConfig.ts). 👀
74
+ Check out the configuration this adds [in the voConfig.ts file](./src/voConfig.ts). 👀
73
75
 
74
- ## Resources
76
+ ## Environment Setup 🐾
75
77
 
76
- Checkout the core [@guidepup/guidepup](https://github.com/guidepup/guidepup)
78
+ Setup your environment for screen-read automation with [`@guidepup/setup`](https://github.com/guidepup/setup):
79
+
80
+ ```bash
81
+ npx @guidepup/setup
82
+ ```
83
+
84
+ If you are using GitHub Actions, check out the dedicated [`guidepup/setup-action`](https://github.com/marketplace/actions/guidepup-setup):
85
+
86
+ ```yaml
87
+ - name: Setup Environment
88
+ uses: guidepup/setup-action@0.1.3
89
+ ```
90
+
91
+ ## See Also 🐶
92
+
93
+ Checkout the core [`@guidepup/guidepup`](https://github.com/guidepup/guidepup)
77
94
  project to learn more about how you can automate your screen-reader workflows
78
95
  using Guidepup.
79
96
 
80
- ## License
97
+ ## License 🐩
81
98
 
82
99
  [MIT](https://github.com/guidepup/guidepup/blob/main/LICENSE)
package/lib/voTest.js CHANGED
@@ -20,7 +20,6 @@ const voTest = test_1.test.extend({
20
20
  await use(vo);
21
21
  }
22
22
  finally {
23
- vo.stopLog();
24
23
  await vo.stop();
25
24
  }
26
25
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guidepup/playwright",
3
- "version": "0.2.0",
3
+ "version": "0.5.0",
4
4
  "description": "Screen-reader driver for Playwright.",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -26,12 +26,12 @@
26
26
  "ci": "yarn clean && yarn lint && yarn build",
27
27
  "clean": "rimraf lib",
28
28
  "compile": "tsc",
29
- "lint": "eslint . --ext .js,.jsx,.ts,.tsx",
29
+ "lint": "eslint . --ext .ts",
30
30
  "lint:fix": "yarn lint --fix",
31
31
  "prepublish": "yarn build"
32
32
  },
33
33
  "dependencies": {
34
- "@guidepup/guidepup": "^0.9.2"
34
+ "@guidepup/guidepup": "^0.12.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@playwright/test": "^1.17.1",
package/yarn.lock CHANGED
@@ -456,10 +456,10 @@
456
456
  minimatch "^3.0.4"
457
457
  strip-json-comments "^3.1.1"
458
458
 
459
- "@guidepup/guidepup@^0.9.2":
460
- version "0.9.2"
461
- resolved "https://registry.yarnpkg.com/@guidepup/guidepup/-/guidepup-0.9.2.tgz#a1e2212f714eb3dd5d65c7749807919e7028c5f9"
462
- integrity sha512-0W3MSKZ8eJcHW7Y0fUWulMkLhxjOZjrpAGzXghcy3vX5dgL75ouDmi/raT+ATACueSuo/P0EGWEm+QH2OHfmlg==
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==
463
463
 
464
464
  "@humanwhocodes/config-array@^0.9.2":
465
465
  version "0.9.2"