@guidepup/playwright 0.6.1 → 0.7.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.
Files changed (3) hide show
  1. package/README.md +12 -15
  2. package/package.json +7 -5
  3. package/yarn.lock +19 -1077
package/README.md CHANGED
@@ -26,30 +26,23 @@ import { voTest as test } from "@guidepup/playwright";
26
26
  import { expect } from "@playwright/test";
27
27
 
28
28
  test.describe("Playwright VoiceOver", () => {
29
- test("I can navigate the Playwright website using VoiceOver", async ({
29
+ test("I can navigate the Guidepup Github page", async ({
30
30
  page,
31
31
  voiceOver,
32
32
  }) => {
33
- // Navigate to Playwright website 🎉
34
- await page.goto("https://playwright.dev/", {
33
+ // Navigate to Guidepup GitHub page 🎉
34
+ await page.goto("https://github.com/guidepup/guidepup", {
35
35
  waitUntil: "domcontentloaded",
36
36
  });
37
37
 
38
- // Interact with the page 🙌
38
+ // Wait for page to be ready and interact 🙌
39
+ await expect(page.locator('header[role="banner"]')).toBeVisible();
39
40
  await voiceOver.interact();
40
41
 
41
- // Move across the navigation menu to the search bar using VoiceOver 🔎
42
- while (!(await voiceOver.lastSpokenPhrase())?.startsWith("Search")) {
43
- await voiceOver.next();
42
+ // Move across the page menu to the Guidepup heading using VoiceOver 🔎
43
+ while ((await voiceOver.itemText()) !== "Guidepup heading level 1") {
44
+ await voiceOver.perform(voiceOver.keyboard.commands.findNextHeading);
44
45
  }
45
-
46
- // Search for Safari 👀
47
- await voiceOver.type("Safari");
48
- await voiceOver.press("ArrowDown");
49
- await voiceOver.press("ArrowUp");
50
- await Promise.all([page.waitForNavigation(), voiceOver.act()]);
51
- expect(page.url()).toBe("https://playwright.dev/docs/browsers#webkit");
52
- });
53
46
  });
54
47
  ```
55
48
 
@@ -88,6 +81,10 @@ If you are using GitHub Actions, check out the dedicated [`guidepup/setup-action
88
81
  uses: guidepup/setup-action@0.1.3
89
82
  ```
90
83
 
84
+ ## Example 👀
85
+
86
+ Check out [this VoiceOver example](./example/).
87
+
91
88
  ## See Also 🐶
92
89
 
93
90
  Checkout the core [`@guidepup/guidepup`](https://github.com/guidepup/guidepup)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guidepup/playwright",
3
- "version": "0.6.1",
3
+ "version": "0.7.0",
4
4
  "description": "Screen-reader driver for Playwright.",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -28,13 +28,15 @@
28
28
  "compile": "tsc",
29
29
  "lint": "eslint . --ext .ts",
30
30
  "lint:fix": "yarn lint --fix",
31
- "prepublish": "yarn build"
31
+ "prepublish": "yarn build",
32
+ "pretest": "npx playwright install webkit",
33
+ "test": "playwright test -c ./example/playwright.config.ts ./example/tests/playwright.spec.ts"
32
34
  },
33
35
  "dependencies": {
34
- "@guidepup/guidepup": "^0.13.0"
36
+ "@guidepup/guidepup": "^0.14.0"
35
37
  },
36
38
  "devDependencies": {
37
- "@playwright/test": "^1.17.1",
39
+ "@playwright/test": "^1.25.1",
38
40
  "@types/node": "^16.11.11",
39
41
  "@typescript-eslint/eslint-plugin": "^5.5.0",
40
42
  "@typescript-eslint/parser": "^5.5.0",
@@ -46,6 +48,6 @@
46
48
  "typescript": "^4.5.2"
47
49
  },
48
50
  "peerDependencies": {
49
- "@playwright/test": "^1.17.1"
51
+ "@playwright/test": "^1.25.1"
50
52
  }
51
53
  }