From 05cdaa6c5c5ea3ed7c0e608a4f001e185839d2fc Mon Sep 17 00:00:00 2001 From: Stalgia Grigg Date: Wed, 4 Dec 2024 12:05:25 -0800 Subject: [PATCH] Add macOS regression test runner, don't test cursor move on macOS --- .github/workflows/regression.yml | 1 + test/tests/combobox_grid-combo.js | 14 ++++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index dd69c29409..b6e98f316d 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -25,6 +25,7 @@ jobs: strategy: fail-fast: false matrix: + os: [ubuntu-latest, macos-latest] CI_NODE_INDEX: [0, 1, 2, 3, 4] steps: diff --git a/test/tests/combobox_grid-combo.js b/test/tests/combobox_grid-combo.js index febaf22f65..57b93c5f3e 100644 --- a/test/tests/combobox_grid-combo.js +++ b/test/tests/combobox_grid-combo.js @@ -4,6 +4,7 @@ const assertAriaLabelledby = require('../util/assertAriaLabelledby'); const assertAttributeValues = require('../util/assertAttributeValues'); const assertAttributeDNE = require('../util/assertAttributeDNE'); const assertAriaRoles = require('../util/assertAriaRoles'); +const isMacOS = require('../util/isMacOS'); const exampleFile = 'content/patterns/combobox/examples/grid-combo.html'; const ex = { @@ -875,10 +876,15 @@ ariaTest( // Send key "ARROW_HOME" await combobox.sendKeys(Key.HOME); - t.true( - await confirmCursorIndex(t, ex.comboboxSelector, 0), - 'Cursor should be at index 0 after one ARROW_HOME key' - ); + + // On macOS, the HOME key deselects the grid popup + // but it doesn't move the cursor. + if (!isMacOS()) { + t.true( + await confirmCursorIndex(t, ex.comboboxSelector, 0), + 'Cursor should be at index 0 after one ARROW_HOME key' + ); + } t.is( await combobox.getAttribute('aria-activedescendant'),