@guidepup/playwright 0.6.1 → 0.7.1
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 +12 -15
- package/package.json +7 -5
- 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
|
|
29
|
+
test("I can navigate the Guidepup Github page", async ({
|
|
30
30
|
page,
|
|
31
31
|
voiceOver,
|
|
32
32
|
}) => {
|
|
33
|
-
// Navigate to
|
|
34
|
-
await page.goto("https://
|
|
33
|
+
// Navigate to Guidepup GitHub page 🎉
|
|
34
|
+
await page.goto("https://github.com/guidepup/guidepup", {
|
|
35
35
|
waitUntil: "domcontentloaded",
|
|
36
36
|
});
|
|
37
37
|
|
|
38
|
-
//
|
|
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
|
|
42
|
-
while (
|
|
43
|
-
await voiceOver.
|
|
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.
|
|
3
|
+
"version": "0.7.1",
|
|
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.
|
|
36
|
+
"@guidepup/guidepup": "^0.14.1"
|
|
35
37
|
},
|
|
36
38
|
"devDependencies": {
|
|
37
|
-
"@playwright/test": "^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.
|
|
51
|
+
"@playwright/test": "^1.25.1"
|
|
50
52
|
}
|
|
51
53
|
}
|