Skip to content

Commit

Permalink
Add macOS regression test runner, don't test cursor move on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
stalgiag committed Dec 4, 2024
1 parent 856188e commit 05cdaa6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
CI_NODE_INDEX: [0, 1, 2, 3, 4]

steps:
Expand Down
14 changes: 10 additions & 4 deletions test/tests/combobox_grid-combo.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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'),
Expand Down

0 comments on commit 05cdaa6

Please sign in to comment.