From 0a84f3917b3b65b31743ef8166249767ee2bd88e Mon Sep 17 00:00:00 2001 From: Stalgia Grigg Date: Thu, 21 Nov 2024 18:52:21 -0800 Subject: [PATCH] Skip tests in combobox that cannot be replicated on macOS, reset disclosure to previous code --- test/tests/combobox_grid-combo.js | 16 +++++++++++++++- test/tests/disclosure_navigation_hybrid.js | 12 ------------ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/test/tests/combobox_grid-combo.js b/test/tests/combobox_grid-combo.js index 799acaac94..a5df1461cf 100644 --- a/test/tests/combobox_grid-combo.js +++ b/test/tests/combobox_grid-combo.js @@ -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 = { @@ -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); @@ -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); diff --git a/test/tests/disclosure_navigation_hybrid.js b/test/tests/disclosure_navigation_hybrid.js index 5d1400fda3..3a9748f418 100644 --- a/test/tests/disclosure_navigation_hybrid.js +++ b/test/tests/disclosure_navigation_hybrid.js @@ -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(