Skip to content

Regression tests fail on macOS due to Windows-based assumptions #2735

@mcking65

Description

@mcking65

@frozenzia wrote:

In toolbar_toolbar.js, there are a couple of tests where CTRL+A are currently used to select all the text in a textarea. This does nothing on a Mac, and copying similar code from alertdialog_alertdialog.js, I've added an extra line to do the selecting in case the test is run on a Mac. After making this one and only change, running the tests still results in 2 test failures (+ 6 known failures):

combobox_grid-combo › content/patterns/combobox/examples/grid-combo.html [data-test-id="popup-key-home"]: Home from focus on list puts focus on grid and moves cursor

test/tests/combobox_grid-combo.js:880

 879:                                                           
 880:     t.true(                                               
 881:       await confirmCursorIndex(t, ex.comboboxSelector, 0),

Cursor should be at index 0 after one ARROW_HOME key

Value is not `true`:

false

› test/tests/combobox_grid-combo.js:880:11



menu-button_actions-active-descendant › content/patterns/menu-button/examples/menu-button-actions-active-descendant.html [data-test-id="menu-end"]: "end" on role="menu"

Rejected promise returned by test. Reason:

AssertionError {
  actual: 'mi3',
  code: 'ERR_ASSERTION',
  expected: 'mi4',
  generatedMessage: false,
  operator: 'strictEqual',
  message: 'aria-activedescendant should be set to mi4 for item: #ex1 [role="menu"]',
}

› assertAriaSelectedAndActivedescendant (test/util/assertAriaActivedescendant.js:24:10)
› async test/tests/menu-button_actions-active-descendant.js:471:3

─

2 tests failed
6 known failures

If I DON'T add those 2 lines in the toolbar test, I actually end up with 5 tests failed:

combobox_grid-combo › content/patterns/combobox/examples/grid-combo.html [data-test-id="popup-key-home"]: Home from focus on list puts focus on grid and moves cursor

test/tests/combobox_grid-combo.js:880

 879:                                                           
 880:     t.true(                                               
 881:       await confirmCursorIndex(t, ex.comboboxSelector, 0),

Cursor should be at index 0 after one ARROW_HOME key

Value is not `true`:

false

› test/tests/combobox_grid-combo.js:880:11



menu-button_actions-active-descendant › content/patterns/menu-button/examples/menu-button-actions-active-descendant.html [data-test-id="menu-end"]: "end" on role="menu"

Rejected promise returned by test. Reason:

AssertionError {
  actual: 'mi3',
  code: 'ERR_ASSERTION',
  expected: 'mi4',
  generatedMessage: false,
  operator: 'strictEqual',
  message: 'aria-activedescendant should be set to mi4 for item: #ex1 [role="menu"]',
}

› assertAriaSelectedAndActivedescendant (test/util/assertAriaActivedescendant.js:24:10)
› async test/tests/menu-button_actions-active-descendant.js:471:3



disclosure_navigation › content/patterns/disclosure/examples/disclosure-navigation.html [data-test-id="link-aria-current"]: "aria-current" attribute on links

Rejected promise returned by test. Reason:

ElementNotInteractableError {
  remoteStacktrace: `RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8␊
  WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:183:5␊
  ElementNotInteractableError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:293:5␊
  webdriverClickElement@chrome://remote/content/marionette/interaction.sys.mjs:150:11␊
  interaction.clickElement@chrome://remote/content/marionette/interaction.sys.mjs:119:11␊
  clickElement@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:214:29␊
  receiveMessage@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:97:31␊
  `,
  message: 'Element <a href="#mythical-page-content"> could not be scrolled into view',
}

› Object.throwDecodedError (node_modules/selenium-webdriver/lib/error.js:524:15)
› parseHttpResponse (node_modules/selenium-webdriver/lib/http.js:587:13)
› Executor.execute (node_modules/selenium-webdriver/lib/http.js:515:28)
› async thenableWebDriverProxy.execute (node_modules/selenium-webdriver/lib/webdriver.js:745:17)
› async test/tests/disclosure_navigation.js:76:9



toolbar_toolbar › content/patterns/toolbar/examples/toolbar.html [data-test-id="toolbar-button-enter-or-space"]: Test key enter on copy/paste/cut keys

test/tests/toolbar_toolbar.js:1119

 1118:                                                         
 1119:     t.is(                                               
 1120:       await buttons[copy].getAttribute('aria-disabled'),

After selecting text

Difference (- actual, + expected):

- 'true'
+ 'false'

› test/tests/toolbar_toolbar.js:1119:7



toolbar_toolbar › content/patterns/toolbar/examples/toolbar.html [data-test-id="toolbar-button-enter-or-space"]: Test key space on copy/paste/cut keys

test/tests/toolbar_toolbar.js:1211

 1210:                                                         
 1211:     t.is(                                               
 1212:       await buttons[copy].getAttribute('aria-disabled'),

After selecting text

Difference (- actual, + expected):

- 'true'
+ 'false'

› test/tests/toolbar_toolbar.js:1211:7

─

5 tests failed
6 known failures

Originally posted by @frozenzia in #2628 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    InfrastructureRelated to maintaining task force and repo operations, processes, systems, documentationbugCode defects; not for inaccurate proseregression-testingRelated to AVA regression tests of example pages or AVA framework implementation within repo

    Type

    No type

    Projects

    Status

    In production / Completed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions