Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
name: Publish to npm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7.0.0
- uses: actions/setup-node@v6
- uses: actions/checkout@v7.0.1
- uses: actions/setup-node@v7
with:
node-version: 24
registry-url: https://registry.npmjs.org/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7.0.0
uses: actions/checkout@v7.0.1
- name: Setup Pages
uses: actions/configure-pages@v6
- name: Upload artifact
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
name: Web Test Runner
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7.0.0
- uses: actions/setup-node@v6
- uses: actions/checkout@v7.0.1
- uses: actions/setup-node@v7
with:
node-version: 24
registry-url: https://registry.npmjs.org/
Expand All @@ -25,27 +25,27 @@ jobs:
name: Guidepup (macOS)
runs-on: macos-latest
steps:
- uses: actions/checkout@v7.0.0
- uses: actions/setup-node@v6
- uses: actions/checkout@v7.0.1
- uses: actions/setup-node@v7
with:
node-version: 24
registry-url: https://registry.npmjs.org/
cache: npm
- run: npm install -g npm@^11.0.0
- run: npm ci
- uses: guidepup/setup-action@5ab89fbb6641406f6f6c91057225f3fb397c2eea
- uses: guidepup/setup-action@5d19b1151e972898cae0f0cc44e239127953bd90
- run: npm run test:guidepup
guidepup-windows:
name: Guidepup (Windows)
runs-on: windows-latest
steps:
- uses: actions/checkout@v7.0.0
- uses: actions/setup-node@v6
- uses: actions/checkout@v7.0.1
- uses: actions/setup-node@v7
with:
node-version: 24
registry-url: https://registry.npmjs.org/
cache: npm
- run: npm install -g npm@^11.0.0
- run: npm ci
- uses: guidepup/setup-action@5ab89fbb6641406f6f6c91057225f3fb397c2eea
- uses: guidepup/setup-action@5d19b1151e972898cae0f0cc44e239127953bd90
- run: npm run test:guidepup
19 changes: 16 additions & 3 deletions tests/guidepup/voiceover.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import path from "node:path";
// Pre-requisites:
// - Run `defaults write com.apple.VoiceOver4/default SCREnableAppleScript 1`

const voiceOverOptions = {
pollTimeout: 30_000,
};

const test = baseTest.extend({
context: async ({ context }, run) => {
await context.addInitScript({
Expand All @@ -30,9 +34,12 @@ const test = baseTest.extend({
});

if (process.platform === "darwin") {
let isVoiceOverStarted = false;

test.beforeAll(async () => {
// Start VoiceOver
await voiceOver.start();
await voiceOver.start(voiceOverOptions);
isVoiceOverStarted = true;
});

test.beforeEach(async ({ page }) => {
Expand All @@ -57,8 +64,14 @@ if (process.platform === "darwin") {
});

test.afterAll(async () => {
// Stop VoiceOver
await voiceOver.stop();
// Stop VoiceOver; suppressing errors
if (!isVoiceOverStarted) {
return;
}

try {
await voiceOver.stop(voiceOverOptions);
} catch {}
});

test("SuggestedText", async ({ page }) => {
Expand Down
Loading