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

[Controls] Fix flaky a11y test #169559

Merged

Conversation

Heenawter
Copy link
Contributor

@Heenawter Heenawter commented Oct 23, 2023

Closes #169542

Summary

For some reason, the search session popover was being opened, which blocked the controls button from being clickable:

image

I'm unsure why this popover is open to begin with; this should only happen when the searchSessionIndicator button is clicked, but this button is not interacted with in any of the accessibility tests (that I could find). This makes me suspicious that this is actually a misclick - i.e. the element that was meant to be clicked gets moved (possibly the Dashboard "edit" button?), which causes the searchSessionIndicator button to be clicked instead.

Going off this theory, I've switched the controls a11y tests to use the Dashboard page's methods (which have more safeguards in place) to navigate to the desired dashboard rather than clicking elements solely based off of the data-test-subj like we were previously.

Flaky Test Runner

image

Checklist

For maintainers

@Heenawter Heenawter added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas loe:small Small Level of Effort release_note:skip Skip the PR/issue when compiling release notes impact:critical This issue should be addressed immediately due to a critical level of impact on the product. labels Oct 23, 2023
@Heenawter Heenawter force-pushed the fix-flaky-169542_controls-a11y_2023-10-23 branch from 8a840d5 to 459f387 Compare October 23, 2023 19:57
@Heenawter Heenawter force-pushed the fix-flaky-169542_controls-a11y_2023-10-23 branch from 459f387 to b162e61 Compare October 23, 2023 20:35
@Heenawter Heenawter marked this pull request as ready for review October 23, 2023 20:46
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@Heenawter Heenawter requested a review from bhavyarm October 23, 2023 20:47
@Heenawter Heenawter changed the title [Controls] Fix flaky a11y tests [Controls] Fix flaky a11y test Oct 23, 2023
@Heenawter Heenawter enabled auto-merge (squash) October 23, 2023 21:56
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

✅ unchanged

History

  • 💔 Build #170095 failed 459f387cd55b0600ae1191347824cfcbc485f7ae
  • 💔 Build #170087 failed a30a9b4c4a2b8441e6887b580585ddb5f431760d
  • 💔 Build #170044 failed 826a170a080e6f8eed61c5f6e9f93f63c89a38e0

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Contributor

@bhavyarm bhavyarm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for addressing this Hannah!

@Heenawter Heenawter merged commit ad932ec into elastic:main Oct 24, 2023
@kibanamachine kibanamachine added v8.12.0 backport:skip This commit does not require backporting labels Oct 24, 2023
@Heenawter Heenawter added backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) v8.11.0 and removed backport:skip This commit does not require backporting labels Nov 7, 2023
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 7, 2023
Closes elastic#169542

## Summary

For some reason, the search session popover was being opened, which
blocked the controls button from being clickable:

![image](https://github.com/elastic/kibana/assets/8698078/6882e67e-6f17-4820-8e71-14e84c3d04c2)

I'm unsure why this popover is open to begin with; this should **only**
happen when the `searchSessionIndicator` button is clicked, but this
button is **not** interacted with in **any** of the accessibility tests
(that I could find). This makes me suspicious that this is actually a
**misclick** - i.e. the element that was meant to be clicked gets moved
(possibly the Dashboard "edit" button?), which causes the
`searchSessionIndicator` button to be clicked instead.

Going off this theory, I've switched the controls `a11y` tests to use
the Dashboard page's methods (which have more safeguards in place) to
navigate to the desired dashboard rather than clicking elements solely
based off of the `data-test-subj` like we were previously.

### [Flaky Test
Runner](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3686)

![image](https://github.com/elastic/kibana/assets/8698078/74fb0d27-9cb2-4650-ba91-97865a3bd962)

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

(cherry picked from commit ad932ec)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.11

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Nov 7, 2023
# Backport

This will backport the following commits from `main` to `8.11`:
- [[Controls] Fix flaky `a11y` test
(#169559)](#169559)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Hannah
Mudge","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-10-24T15:48:16Z","message":"[Controls]
Fix flaky `a11y` test (#169559)\n\nCloses
https://github.com/elastic/kibana/issues/169542\r\n\r\n##
Summary\r\n\r\nFor some reason, the search session popover was being
opened, which\r\nblocked the controls button from being
clickable:\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/8698078/6882e67e-6f17-4820-8e71-14e84c3d04c2)\r\n\r\nI'm
unsure why this popover is open to begin with; this should
**only**\r\nhappen when the `searchSessionIndicator` button is clicked,
but this\r\nbutton is **not** interacted with in **any** of the
accessibility tests\r\n(that I could find). This makes me suspicious
that this is actually a\r\n**misclick** - i.e. the element that was
meant to be clicked gets moved\r\n(possibly the Dashboard \"edit\"
button?), which causes the\r\n`searchSessionIndicator` button to be
clicked instead.\r\n\r\nGoing off this theory, I've switched the
controls `a11y` tests to use\r\nthe Dashboard page's methods (which have
more safeguards in place) to\r\nnavigate to the desired dashboard rather
than clicking elements solely\r\nbased off of the `data-test-subj` like
we were previously.\r\n\r\n### [Flaky
Test\r\nRunner](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3686)\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/8698078/74fb0d27-9cb2-4650-ba91-97865a3bd962)\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n\r\n### For
maintainers\r\n\r\n- [ ] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"ad932ec5d5c71c33f11cdf29dd5faa10123e1ca9","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Presentation","loe:small","release_note:skip","impact:critical","backport:prev-minor","v8.11.0","v8.12.0"],"number":169559,"url":"https://github.com/elastic/kibana/pull/169559","mergeCommit":{"message":"[Controls]
Fix flaky `a11y` test (#169559)\n\nCloses
https://github.com/elastic/kibana/issues/169542\r\n\r\n##
Summary\r\n\r\nFor some reason, the search session popover was being
opened, which\r\nblocked the controls button from being
clickable:\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/8698078/6882e67e-6f17-4820-8e71-14e84c3d04c2)\r\n\r\nI'm
unsure why this popover is open to begin with; this should
**only**\r\nhappen when the `searchSessionIndicator` button is clicked,
but this\r\nbutton is **not** interacted with in **any** of the
accessibility tests\r\n(that I could find). This makes me suspicious
that this is actually a\r\n**misclick** - i.e. the element that was
meant to be clicked gets moved\r\n(possibly the Dashboard \"edit\"
button?), which causes the\r\n`searchSessionIndicator` button to be
clicked instead.\r\n\r\nGoing off this theory, I've switched the
controls `a11y` tests to use\r\nthe Dashboard page's methods (which have
more safeguards in place) to\r\nnavigate to the desired dashboard rather
than clicking elements solely\r\nbased off of the `data-test-subj` like
we were previously.\r\n\r\n### [Flaky
Test\r\nRunner](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3686)\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/8698078/74fb0d27-9cb2-4650-ba91-97865a3bd962)\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n\r\n### For
maintainers\r\n\r\n- [ ] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"ad932ec5d5c71c33f11cdf29dd5faa10123e1ca9"}},"sourceBranch":"main","suggestedTargetBranches":["8.11"],"targetPullRequestStates":[{"branch":"8.11","label":"v8.11.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/169559","number":169559,"mergeCommit":{"message":"[Controls]
Fix flaky `a11y` test (#169559)\n\nCloses
https://github.com/elastic/kibana/issues/169542\r\n\r\n##
Summary\r\n\r\nFor some reason, the search session popover was being
opened, which\r\nblocked the controls button from being
clickable:\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/8698078/6882e67e-6f17-4820-8e71-14e84c3d04c2)\r\n\r\nI'm
unsure why this popover is open to begin with; this should
**only**\r\nhappen when the `searchSessionIndicator` button is clicked,
but this\r\nbutton is **not** interacted with in **any** of the
accessibility tests\r\n(that I could find). This makes me suspicious
that this is actually a\r\n**misclick** - i.e. the element that was
meant to be clicked gets moved\r\n(possibly the Dashboard \"edit\"
button?), which causes the\r\n`searchSessionIndicator` button to be
clicked instead.\r\n\r\nGoing off this theory, I've switched the
controls `a11y` tests to use\r\nthe Dashboard page's methods (which have
more safeguards in place) to\r\nnavigate to the desired dashboard rather
than clicking elements solely\r\nbased off of the `data-test-subj` like
we were previously.\r\n\r\n### [Flaky
Test\r\nRunner](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3686)\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/8698078/74fb0d27-9cb2-4650-ba91-97865a3bd962)\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n\r\n### For
maintainers\r\n\r\n- [ ] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"ad932ec5d5c71c33f11cdf29dd5faa10123e1ca9"}}]}]
BACKPORT-->

Co-authored-by: Hannah Mudge <[email protected]>
@mistic mistic added v8.11.1 and removed v8.11.0 labels Nov 8, 2023
@mistic
Copy link
Member

mistic commented Nov 8, 2023

This PR didn't make it into the last BC of 8.11.0. Updating the labels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) impact:critical This issue should be addressed immediately due to a critical level of impact on the product. loe:small Small Level of Effort release_note:skip Skip the PR/issue when compiling release notes Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v8.11.1 v8.12.0
Projects
None yet
6 participants