Skip to content

Commit

Permalink
Skip tests in combobox that cannot be replicated on macOS, reset disc…
Browse files Browse the repository at this point in the history
…losure to previous code
  • Loading branch information
stalgiag committed Nov 22, 2024
1 parent ef0f7ba commit 0a84f39
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
16 changes: 15 additions & 1 deletion test/tests/combobox_grid-combo.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +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 @@ -874,6 +874,13 @@ ariaTest(
const combobox = t.context.session.findElement(By.css(ex.comboboxSelector));
await combobox.sendKeys('a', Key.ARROW_DOWN);

// "ARROW_HOME" is not valid on macos, equivalent is an FN + ARROW_LEFT key chord
// Selenium WebDriver does not support FN keys, so this test is not valid on macos
if (isMacOS()) {
t.pass('Skipping test on macOS - HOME key not supported');
return;
}

// Send key "ARROW_HOME"
await combobox.sendKeys(Key.HOME);

Expand All @@ -899,6 +906,13 @@ ariaTest(
const combobox = t.context.session.findElement(By.css(ex.comboboxSelector));
await combobox.sendKeys('a', Key.ARROW_DOWN);

// "ARROW_END" is not valid on macos, equivalent is an FN + ARROW_RIGHT key chord
// Selenium WebDriver does not support FN keys, so this test is not valid on macos
if (isMacOS()) {
t.pass('Skipping test on macOS - END key not supported');
return;
}

// Send key "END_ARROW"
await combobox.sendKeys(Key.END);

Expand Down
12 changes: 0 additions & 12 deletions test/tests/disclosure_navigation_hybrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,6 @@ ariaTest(

if (links.length > 0) {
await buttons[b].click();
// Add explicit wait for menu visibility
await t.context.session.wait(
async () => await menus[b].isDisplayed(),
1000,
'Menu should be displayed'
);
// Ensure link is interactive
await t.context.session.wait(
async () => await links[0].isEnabled(),
1000,
'Link should be enabled'
);
await links[0].click();

t.is(
Expand Down

0 comments on commit 0a84f39

Please sign in to comment.