Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing test: X-Pack Accessibility Tests.x-pack/test/accessibility/apps/lens·ts - Lens "after all" hook for "saves lens chart" #88927

Closed
kibanamachine opened this issue Jan 21, 2021 · 35 comments · Fixed by #88954, #91397 or #131035
Assignees
Labels
blocked failed-test A test failure on a tracked branch, potentially flaky-test Feature:Lens Project:Accessibility Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@kibanamachine
Copy link
Contributor

kibanamachine commented Jan 21, 2021

A test failed on a tracked branch

Error: retry.try timeout: TimeoutError: Waiting for element to be located By(css selector, [data-test-subj="deleteSelectedItems"])
Wait timed out after 10057ms
    at /dev/shm/workspace/kibana/node_modules/selenium-webdriver/lib/webdriver.js:842:17
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at onFailure (/dev/shm/workspace/parallel/4/kibana/test/common/services/retry/retry_for_success.ts:17:9)
    at retryForSuccess (/dev/shm/workspace/parallel/4/kibana/test/common/services/retry/retry_for_success.ts:57:13)
    at Retry.try (/dev/shm/workspace/parallel/4/kibana/test/common/services/retry/retry.ts:32:14)
    at Proxy.clickByCssSelector (/dev/shm/workspace/parallel/4/kibana/test/functional/services/common/find.ts:419:7)
    at TestSubjects.click (/dev/shm/workspace/parallel/4/kibana/test/functional/services/common/test_subjects.ts:105:7)
    at ListingTable.clickDeleteSelected (/dev/shm/workspace/parallel/4/kibana/test/functional/services/listing_table.ts:141:7)
    at Context.<anonymous> (test/accessibility/apps/lens.ts:28:7)
    at Object.apply (/dev/shm/workspace/parallel/4/kibana/packages/kbn-test/src/functional_test_runner/lib/mocha/wrap_function.js:73:16)

First failure: Jenkins Build

@kibanamachine kibanamachine added the failed-test A test failure on a tracked branch, potentially flaky-test label Jan 21, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-accessibility (Project:Accessibility)

@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

spalger added a commit that referenced this issue Jan 21, 2021
@myasonik myasonik added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Jan 21, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@spalger
Copy link
Contributor

spalger commented Jan 21, 2021

10 failures in master, 7.x, and PRs in this suite since #88623 was merged 12 hours ago. CC @markov00

image

Skipped
master: 97c7f5c
7.x/7.12: 2e1d055

@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

@flash1293
Copy link
Contributor

It looks like this failed because the sample data wasn't installed correctly - after navigating to visualize it was redirected to index pattern management. Maybe some wait time before navigating to visualize would do the trick?

@flash1293
Copy link
Contributor

I think this is an instability of either sample data or the way Elasticsearch is used in the functional tests. In some cases the sample data is available, but the saved objects are missing, in some cases not even those are loaded:
Screenshot 2021-02-10 at 15 36 14
Screenshot 2021-02-10 at 15 36 19

I checked the code of sample data and they create the saved objects as last step with the default refresh parameter which is "wait_for", so the UI shouldn't refresh before the saved objects are available in Elasticsearch.

@spalger This looks somewhat similar to another failure we were looking into: #77567 It looks like in some situations saved objects or other Elasticsearch data is not immediately available.

Could you take a look from this new angle? Based on the code it seems very unlikely this is related to migration somehow.

@flash1293
Copy link
Contributor

The failures are pretty rare, If we had some CI instability in the last few days, that might explain it as well (that's not scientific but personally I saw quite a few PRs failing in weird and flaky ways lately).
Screenshot 2021-02-10 at 15 48 06

@flash1293 flash1293 self-assigned this Feb 10, 2021
@flash1293
Copy link
Contributor

I hope #91000 fill fix this one as well

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - master

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - master

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - master

@flash1293
Copy link
Contributor

flash1293 commented Oct 20, 2021

Seems like a real failure, not sure what started to trigger it:



VIOLATION
--
  | │   [aria-input-field-name]: Ensures every ARIA input field has an accessible name
  | │     Help: https://dequeuniversity.com/rules/axe/4.0/aria-input-field-name?application=axeAPI
  | │     Elements:
  | │       - .euiSuperSelect__listbox
  | │       at AccessibilityService.assertValidAxeReport (/opt/local-ssd/buildkite/builds/kb-cigroup-6-5ddd82f32068eec7/elastic/kibana-hourly/kibana/test/accessibility/services/a11y/a11y.ts:76:13)
  | │       at AccessibilityService.testAppSnapshot (/opt/local-ssd/buildkite/builds/kb-cigroup-6-5ddd82f32068eec7/elastic/kibana-hourly/kibana/test/accessibility/services/a11y/a11y.ts:49:10)
  | │       at runMicrotasks (<anonymous>)
  | │       at processTicksAndRejections (node:internal/process/task_queues:96:5)
  | │       at Context.<anonymous> (test/accessibility/apps/lens.ts:90:7)
  | │       at Object.apply (/opt/local-ssd/buildkite/builds/kb-cigroup-6-5ddd82f32068eec7/elastic/kibana-hourly/kibana/node_modules/@kbn/test/target_node/functional_test_runner/lib/mocha/wrap_function


Screenshot doesn't show anything weird
Screenshot 2021-10-20 at 17 23 20

Maybe this is an EUI problem? @chandlerprall is there anything known about this problem already by any chance? euiSuperSelect__listbox seems like to be an internal class name so I guess it's not limited to this single place.

@chandlerprall
Copy link
Contributor

The euiSuperSelect__listbox element hasn't be changed in quite a while, but perhaps the AXE rule was changed or expanded and now errors?

https://github.com/elastic/eui/blob/master/src/components/form/super_select/super_select.tsx#L361-L366

        <div
          className="euiSuperSelect__listbox"
          role="listbox"
          aria-activedescendant={valueOfSelected}
          tabIndex={0}
        >

Seems valid that it should be given an accessible name as it has role + tabIndex defined. @1Copenut any thoughts here?

@1Copenut
Copy link
Contributor

1Copenut commented Oct 20, 2021

UPDATE:
Logged into EUI as elastic/eui#5292

Looking at the issue locally on EUI, I have been able to re-create it. I'm guessing the functional test may have run with the EuiSuperSelect still expanded, and caught the listbox without an accessible label. This issue should be addressed in EUI. I'll add a ticket now and update my comment with a number in a few.

@flash1293
Copy link
Contributor

Awesome, thanks @1Copenut - I will mark this as blocked until the EUI fix lands in Kibana

@flash1293
Copy link
Contributor

Same underlying problem as #115614

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

@flash1293
Copy link
Contributor

I'm not sure where this failure is coming from. It says

[00:11:29]       │   [aria-valid-attr-value]: Ensures all ARIA attributes have valid values
[00:11:29]       │     Impact: critical
[00:11:29]       │     Help: https://dequeuniversity.com/rules/axe/4.0/aria-valid-attr-value?application=axeAPI
[00:11:29]       │     Elements:
[00:11:29]       │       - <input type="search" placeholder="Filter options" class="euiFieldSearch euiFormControlLayout--1icons euiFieldSearch--fullWidth euiFieldSearch-isClearable euiSelectableSearch lnsChartSwitch__search" autocomplete="off" aria-haspopup="listbox" aria-activedescendant="iec0203c0-c585-11ec-b7e1-a710218dd424_listbox_option--1" aria-label="Filter options" data-test-subj="lnsChartSwitchSearch" value="ine" role="combobox" aria-autocomplete="list" aria-expanded="true" aria-controls="iec0203c0-c585-11ec-b7e1-a710218dd424_listbox" aria-owns="iec0203c0-c585-11ec-b7e1-a710218dd424_listbox">

But the dom doesn't even contain this element anymore in the failure snapshot. Also the aria attributes seem valid to me provided the referenced controlled listbox component actually exists.

I'm fixing this by making sure the test is executed as long as the chart switcher is fully rendered.

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

@flash1293
Copy link
Contributor

The failure from above didn't have the fix yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked failed-test A test failure on a tracked branch, potentially flaky-test Feature:Lens Project:Accessibility Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
8 participants