Skip to content

Commit

Permalink
Install macOS AT Driver server from npm (#33)
Browse files Browse the repository at this point in the history
* Install macOS AT Driver server from npm

This package was published to npm today, and the latest version includes
a recent fix for issues with simulating pressing of the "Shift" key.

* fixup! Install macOS AT Driver server from npm

* fixup! Install macOS AT Driver server from npm
  • Loading branch information
jugglinmike authored Oct 10, 2024
1 parent 4fb22e8 commit e82beed
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 17 deletions.
29 changes: 14 additions & 15 deletions .github/workflows/voiceover-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,20 @@ on:
The browser to use for testing, "chrome" or "firefox" or "safari", default "safari"
required: false
type: string
at_driver_server_version:
description: |
The version or version range of the macOS AT Driver server to install from npm
required: false
type: string
default: "~0.0.6"

env:
ARIA_AT_WORK_DIR: ${{ inputs.work_dir || 'tests/alert' }}
ARIA_AT_CALLBACK_URL: ${{ inputs.callback_url }}
ARIA_AT_STATUS_URL: ${{ inputs.status_url }}
ARIA_AT_CALLBACK_HEADER: ${{ inputs.callback_header || 'x-header-param:empty' }}
BROWSER: ${{ inputs.browser || 'safari' }}
AT_DRIVER_SERVER_VERSION: ${{ inputs.at_driver_server_version }}

jobs:
voiceover-test:
Expand All @@ -64,13 +71,6 @@ jobs:
if: inputs.status_url
run: ./report-status.sh QUEUED ''

- uses: robinraju/[email protected]
with:
repository: "w3c/aria-at-automation-driver"
tag: "v0.0.1-beta"
extract: true
out-file-path: aria-at-automation-driver

- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
Expand All @@ -95,18 +95,17 @@ jobs:
- name: Setup Environment
uses: guidepup/[email protected]

- name: "automation-driver: npm install"
working-directory: aria-at-automation-driver/package
run: npm install
- name: Install the macOS AT Driver server package
run: npm install @bocoup/macos-at-driver-server@"${AT_DRIVER_SERVER_VERSION}"

- name: "automation-driver: install"
- name: Configure the system to support the AT Driver server
env:
DEBUG: "*"
working-directory: aria-at-automation-driver/package
run: ./bin/at-driver install --unattended
working-directory: node_modules/.bin
run: ./at-driver install --unattended

- name: Wait for server to be ready
working-directory: aria-at-automation-driver/package
- name: Wait for the AT Driver server to be ready
working-directory: node_modules/.bin
run: ../../wait-for-server.sh

- name: Checkout aria-at ref ${{ inputs.aria_at_ref || 'master' }}
Expand Down
2 changes: 1 addition & 1 deletion run-tester.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function clean_up {
}
trap clean_up EXIT

aria-at-automation-driver/package/bin/at-driver serve --port 3031 > at-driver.log 2>&1 &
./node_modules/.bin/at-driver serve --port 3031 > at-driver.log 2>&1 &
atdriver_pid=$!

poll_url() {
Expand Down
2 changes: 1 addition & 1 deletion wait-for-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ trap clean_up EXIT
for attempt in $(seq ${max_attempts}); do
echo "Testing for server availability (trial ${attempt} of ${max_attempts})."

./bin/at-driver serve 2> ${temp_file} &
./at-driver serve 2> ${temp_file} &
sleep 3
say This text came from the say command.
sleep 1
Expand Down

0 comments on commit e82beed

Please sign in to comment.