@guidepup/playwright
Advanced tools
Comparing version 0.6.1 to 0.7.0
{ | ||
"name": "@guidepup/playwright", | ||
"version": "0.6.1", | ||
"version": "0.7.0", | ||
"description": "Screen-reader driver for Playwright.", | ||
@@ -31,9 +31,11 @@ "main": "lib/index.js", | ||
"lint:fix": "yarn lint --fix", | ||
"prepublish": "yarn build" | ||
"prepublish": "yarn build", | ||
"pretest": "npx playwright install webkit", | ||
"test": "playwright test -c ./example/playwright.config.ts ./example/tests/playwright.spec.ts" | ||
}, | ||
"dependencies": { | ||
"@guidepup/guidepup": "^0.13.0" | ||
"@guidepup/guidepup": "^0.14.0" | ||
}, | ||
"devDependencies": { | ||
"@playwright/test": "^1.17.1", | ||
"@playwright/test": "^1.25.1", | ||
"@types/node": "^16.11.11", | ||
@@ -50,4 +52,4 @@ "@typescript-eslint/eslint-plugin": "^5.5.0", | ||
"peerDependencies": { | ||
"@playwright/test": "^1.17.1" | ||
"@playwright/test": "^1.25.1" | ||
} | ||
} |
@@ -29,26 +29,19 @@ <h1 align="center">Guidepup Playwright</h1> | ||
test.describe("Playwright VoiceOver", () => { | ||
test("I can navigate the Playwright website using VoiceOver", async ({ | ||
test("I can navigate the Guidepup Github page", async ({ | ||
page, | ||
voiceOver, | ||
}) => { | ||
// Navigate to Playwright website 🎉 | ||
await page.goto("https://playwright.dev/", { | ||
// Navigate to Guidepup GitHub page 🎉 | ||
await page.goto("https://github.com/guidepup/guidepup", { | ||
waitUntil: "domcontentloaded", | ||
}); | ||
// Interact with the page 🙌 | ||
// Wait for page to be ready and interact 🙌 | ||
await expect(page.locator('header[role="banner"]')).toBeVisible(); | ||
await voiceOver.interact(); | ||
// Move across the navigation menu to the search bar using VoiceOver 🔎 | ||
while (!(await voiceOver.lastSpokenPhrase())?.startsWith("Search")) { | ||
await voiceOver.next(); | ||
// Move across the page menu to the Guidepup heading using VoiceOver 🔎 | ||
while ((await voiceOver.itemText()) !== "Guidepup heading level 1") { | ||
await voiceOver.perform(voiceOver.keyboard.commands.findNextHeading); | ||
} | ||
// Search for Safari 👀 | ||
await voiceOver.type("Safari"); | ||
await voiceOver.press("ArrowDown"); | ||
await voiceOver.press("ArrowUp"); | ||
await Promise.all([page.waitForNavigation(), voiceOver.act()]); | ||
expect(page.url()).toBe("https://playwright.dev/docs/browsers#webkit"); | ||
}); | ||
}); | ||
@@ -92,2 +85,6 @@ ``` | ||
## Example 👀 | ||
Check out [this VoiceOver example](./example/). | ||
## See Also 🐶 | ||
@@ -94,0 +91,0 @@ |
Sorry, the diff of this file is not supported yet
54251
97
+ Added@guidepup/guidepup@0.14.7(transitive)
- Removed@guidepup/guidepup@0.13.1(transitive)
Updated@guidepup/guidepup@^0.14.0