diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5f26753..fd9fd99 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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/ diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 1892759..5fa2a32 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b4f1afa..aeb154e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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/ @@ -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 diff --git a/tests/guidepup/voiceover.spec.mjs b/tests/guidepup/voiceover.spec.mjs index dac4f8c..c8aeef5 100644 --- a/tests/guidepup/voiceover.spec.mjs +++ b/tests/guidepup/voiceover.spec.mjs @@ -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({ @@ -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 }) => { @@ -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 }) => {