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: Security Solution Cypress.x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_selection·cy·ts - Rules table: selection should correctly update the selection label when rules are individually selected and unselected should correctly update the selection label when rules are individually selected and unselected #164279

Closed
Tracked by #161507
kibanamachine opened this issue Aug 21, 2023 · 7 comments · Fixed by #164099 or #171414
Assignees
Labels
8.12 candidate failed-test A test failure on a tracked branch, potentially flaky-test Feature:Rule Management Security Solution Detection Rule Management area Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.

Comments

@kibanamachine
Copy link
Contributor

kibanamachine commented Aug 21, 2023

A test failed on a tracked branch

AssertionError: Timed out retrying after 150000ms: expected '<input#__table_90921f11-400a-11ee-a92e-05c43539960b_selection_column_27e8c180-400a-11ee-9841-3145d5039a8f-checkbox.euiCheckbox__input>' to be 'checked'
    at selectNumberOfRules (webpack:///./tasks/alerts_detection_rules.ts:210:32)
    at Context.eval (webpack:///./e2e/detection_response/rule_management/rules_table/rules_table_selection.cy.ts:54:24)

First failure: CI Build - main

@kibanamachine kibanamachine added the failed-test A test failure on a tracked branch, potentially flaky-test label Aug 21, 2023
@botelastic botelastic bot added the needs-team Issues missing a team label label Aug 21, 2023
@kibanamachine kibanamachine added the Team:Detection Rule Management Security Detection Rule Management Team label Aug 21, 2023
@botelastic botelastic bot removed the needs-team Issues missing a team label label Aug 21, 2023
@banderror banderror added Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Feature:Rule Management Security Solution Detection Rule Management area 8.10 candidate labels Aug 21, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@banderror
Copy link
Contributor

@jpdjere probably your fix mentioned in #154694 (comment) hasn't fully fixed it. @maximpn could you please take a look into this one?

@jpdjere
Copy link
Contributor

jpdjere commented Aug 21, 2023

@banderror This one is caused by the inherently flaky selectNumberOfRules util function we discussed about last week.

#164099 should fix this.

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

maximpn added a commit that referenced this issue Aug 23, 2023
**Relates to: #161507
**Fixes: #163704
**Fixes: #163182
**Fixes: #163558
**Fixes: #163974
**Fixes: #153914
**Fixes: #164079
**Fixes: #164279

## Summary

While working on fixing Rules Management flaky tests I've noticed similar fails in different tests. This PR addresses common pitfalls to reduce a number of reasons causing e2e tests flakiness and as a result reduce a number of flaky tests.

## Details

The common reasons causing e2e tests flakiness for the rules tables are

- Auto-refresh

Auto-refresh functionality is enabled by default and the table gets auto-refreshed every 60 seconds. If a test takes more than 60 seconds the table fetches updated rules. Having rules enabled by default and sorted by `Enabled` column makes the sorting order undetermined and as rules get updated due to execution ES return them in undetermined order. This update can happen between commands working on the same element and indexed access like `eq()` would access different elements. 

- Missing selectors

Some tests or helper functions have expectations for an element absence like `should('not.exist')` without checking an element is visible before like `should('be.visible')`. This way a referenced element may disappear from the codebase after refactoring and the expectation still fulfils.

- Checking for `should('not.visible')` while an element is removed from the DOM

It most applicable to popovers as it first animates to be hidden and then removed from the DOM. Cypress first need to find an element to check its visibility. Replacing `should('not.visible')` with `should('not.exist')` and taking into concern from the account previous bullet fixes the problem.

- Modifying ES data without refreshing (`_delete_by_query` in particular)

Due to high performance ES architecture data isn't updated instantly. Having such behavior in tests leads to undetermined state depending on a number of environmental factors. As UI doesn't always auto-refreshes to fetch the recent updates in short period of time test fail. `_delete_by_query` may take some time to update the data but it doesn't support `refresh=wait_for` as it stated in [docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html#_refreshing_shards). Adding `?refresh=true` or just `?refresh` to `_delete_by_query` ES request urls fixes the problem.

### What was done to address mentioned reasons above?

- Auto-refresh functionality disabled in tests where it's not necessary.
- `enabled: false` field was added to rule creators to have disabled rules as the majority of tests don't need enabled rules.
- `waitForRulesTableToBeLoaded` was removed and replaced with `expectManagementTableRules` at some tests.
- `should('not.visible')` replaced with `should('not.exist')` in `deleteRuleFromDetailsPage()`
- `?refresh` added to `_delete_by_query` ES data update requests

The other changes get rid of global constants and improve readability.

## Flaky test runs

[All Cypress tests under `detection_response` folder (100 runs)](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2920) (value lists export is flaky but it's out of scope of this PR)
maximpn added a commit to maximpn/kibana that referenced this issue Aug 25, 2023
…4099)

**Relates to: elastic#161507
**Fixes: elastic#163704
**Fixes: elastic#163182
**Fixes: elastic#163558
**Fixes: elastic#163974
**Fixes: elastic#153914
**Fixes: elastic#164079
**Fixes: elastic#164279

## Summary

While working on fixing Rules Management flaky tests I've noticed similar fails in different tests. This PR addresses common pitfalls to reduce a number of reasons causing e2e tests flakiness and as a result reduce a number of flaky tests.

## Details

The common reasons causing e2e tests flakiness for the rules tables are

- Auto-refresh

Auto-refresh functionality is enabled by default and the table gets auto-refreshed every 60 seconds. If a test takes more than 60 seconds the table fetches updated rules. Having rules enabled by default and sorted by `Enabled` column makes the sorting order undetermined and as rules get updated due to execution ES return them in undetermined order. This update can happen between commands working on the same element and indexed access like `eq()` would access different elements.

- Missing selectors

Some tests or helper functions have expectations for an element absence like `should('not.exist')` without checking an element is visible before like `should('be.visible')`. This way a referenced element may disappear from the codebase after refactoring and the expectation still fulfils.

- Checking for `should('not.visible')` while an element is removed from the DOM

It most applicable to popovers as it first animates to be hidden and then removed from the DOM. Cypress first need to find an element to check its visibility. Replacing `should('not.visible')` with `should('not.exist')` and taking into concern from the account previous bullet fixes the problem.

- Modifying ES data without refreshing (`_delete_by_query` in particular)

Due to high performance ES architecture data isn't updated instantly. Having such behavior in tests leads to undetermined state depending on a number of environmental factors. As UI doesn't always auto-refreshes to fetch the recent updates in short period of time test fail. `_delete_by_query` may take some time to update the data but it doesn't support `refresh=wait_for` as it stated in [docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html#_refreshing_shards). Adding `?refresh=true` or just `?refresh` to `_delete_by_query` ES request urls fixes the problem.

### What was done to address mentioned reasons above?

- Auto-refresh functionality disabled in tests where it's not necessary.
- `enabled: false` field was added to rule creators to have disabled rules as the majority of tests don't need enabled rules.
- `waitForRulesTableToBeLoaded` was removed and replaced with `expectManagementTableRules` at some tests.
- `should('not.visible')` replaced with `should('not.exist')` in `deleteRuleFromDetailsPage()`
- `?refresh` added to `_delete_by_query` ES data update requests

The other changes get rid of global constants and improve readability.

## Flaky test runs

[All Cypress tests under `detection_response` folder (100 runs)](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2920) (value lists export is flaky but it's out of scope of this PR)

(cherry picked from commit 40df521)

# Conflicts:
#	x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/custom_query_rule.cy.ts
maximpn referenced this issue Aug 26, 2023
…4099) (#164903)

# Backport

This will backport the following commits from `main` to `8.10`:
- [[Security Solution] Reduce Rules Management e2e flakiness
(#164099)](#164099)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT [{"author":{"name":"Maxim
Palenov","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-08-23T14:58:04Z","message":"[Security
Solution] Reduce Rules Management e2e flakiness (#164099)\n\n**Relates
to: https://github.com/elastic/kibana/issues/161507**\r\n**Fixes:
https://github.com/elastic/kibana/issues/163704**\r\n**Fixes:
https://github.com/elastic/kibana/issues/163182**\r\n**Fixes:
https://github.com/elastic/kibana/issues/163558**\r\n**Fixes:
https://github.com/elastic/kibana/issues/163974**\r\n**Fixes:
https://github.com/elastic/kibana/issues/153914**\r\n**Fixes:
https://github.com/elastic/kibana/issues/164079**\r\n**Fixes:
https://github.com/elastic/kibana/issues/164279**\r\n\r\n##
Summary\r\n\r\nWhile working on fixing Rules Management flaky tests I've
noticed similar fails in different tests. This PR addresses common
pitfalls to reduce a number of reasons causing e2e tests flakiness and
as a result reduce a number of flaky tests.\r\n\r\n## Details\r\n\r\nThe
common reasons causing e2e tests flakiness for the rules tables
are\r\n\r\n- Auto-refresh\r\n\r\nAuto-refresh functionality is enabled
by default and the table gets auto-refreshed every 60 seconds. If a test
takes more than 60 seconds the table fetches updated rules. Having rules
enabled by default and sorted by `Enabled` column makes the sorting
order undetermined and as rules get updated due to execution ES return
them in undetermined order. This update can happen between commands
working on the same element and indexed access like `eq()` would access
different elements. \r\n\r\n- Missing selectors\r\n\r\nSome tests or
helper functions have expectations for an element absence like
`should('not.exist')` without checking an element is visible before like
`should('be.visible')`. This way a referenced element may disappear from
the codebase after refactoring and the expectation still
fulfils.\r\n\r\n- Checking for `should('not.visible')` while an element
is removed from the DOM\r\n\r\nIt most applicable to popovers as it
first animates to be hidden and then removed from the DOM. Cypress first
need to find an element to check its visibility. Replacing
`should('not.visible')` with `should('not.exist')` and taking into
concern from the account previous bullet fixes the problem.\r\n\r\n-
Modifying ES data without refreshing (`_delete_by_query` in
particular)\r\n\r\nDue to high performance ES architecture data isn't
updated instantly. Having such behavior in tests leads to undetermined
state depending on a number of environmental factors. As UI doesn't
always auto-refreshes to fetch the recent updates in short period of
time test fail. `_delete_by_query` may take some time to update the data
but it doesn't support `refresh=wait_for` as it stated in
[docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html#_refreshing_shards).
Adding `?refresh=true` or just `?refresh` to `_delete_by_query` ES
request urls fixes the problem.\r\n\r\n### What was done to address
mentioned reasons above?\r\n\r\n- Auto-refresh functionality disabled in
tests where it's not necessary.\r\n- `enabled: false` field was added to
rule creators to have disabled rules as the majority of tests don't need
enabled rules.\r\n- `waitForRulesTableToBeLoaded` was removed and
replaced with `expectManagementTableRules` at some tests.\r\n-
`should('not.visible')` replaced with `should('not.exist')` in
`deleteRuleFromDetailsPage()`\r\n- `?refresh` added to
`_delete_by_query` ES data update requests\r\n\r\nThe other changes get
rid of global constants and improve readability.\r\n\r\n## Flaky test
runs\r\n\r\n[All Cypress tests under `detection_response` folder (100
runs)](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2920)
(value lists export is flaky but it's out of scope of this
PR)","sha":"40df5219ea7165e89623afcc22bb0dbc3cc19152","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","release_note:skip","Team:Detections
and Resp","Team: SecuritySolution","Feature:Rule
Management","Team:Detection Rule
Management","v8.10.0","v8.11.0"],"number":164099,"url":"https://github.com/elastic/kibana/pull/164099","mergeCommit":{"message":"[Security
Solution] Reduce Rules Management e2e flakiness (#164099)\n\n**Relates
to: https://github.com/elastic/kibana/issues/161507**\r\n**Fixes:
https://github.com/elastic/kibana/issues/163704**\r\n**Fixes:
https://github.com/elastic/kibana/issues/163182**\r\n**Fixes:
https://github.com/elastic/kibana/issues/163558**\r\n**Fixes:
https://github.com/elastic/kibana/issues/163974**\r\n**Fixes:
https://github.com/elastic/kibana/issues/153914**\r\n**Fixes:
https://github.com/elastic/kibana/issues/164079**\r\n**Fixes:
https://github.com/elastic/kibana/issues/164279**\r\n\r\n##
Summary\r\n\r\nWhile working on fixing Rules Management flaky tests I've
noticed similar fails in different tests. This PR addresses common
pitfalls to reduce a number of reasons causing e2e tests flakiness and
as a result reduce a number of flaky tests.\r\n\r\n## Details\r\n\r\nThe
common reasons causing e2e tests flakiness for the rules tables
are\r\n\r\n- Auto-refresh\r\n\r\nAuto-refresh functionality is enabled
by default and the table gets auto-refreshed every 60 seconds. If a test
takes more than 60 seconds the table fetches updated rules. Having rules
enabled by default and sorted by `Enabled` column makes the sorting
order undetermined and as rules get updated due to execution ES return
them in undetermined order. This update can happen between commands
working on the same element and indexed access like `eq()` would access
different elements. \r\n\r\n- Missing selectors\r\n\r\nSome tests or
helper functions have expectations for an element absence like
`should('not.exist')` without checking an element is visible before like
`should('be.visible')`. This way a referenced element may disappear from
the codebase after refactoring and the expectation still
fulfils.\r\n\r\n- Checking for `should('not.visible')` while an element
is removed from the DOM\r\n\r\nIt most applicable to popovers as it
first animates to be hidden and then removed from the DOM. Cypress first
need to find an element to check its visibility. Replacing
`should('not.visible')` with `should('not.exist')` and taking into
concern from the account previous bullet fixes the problem.\r\n\r\n-
Modifying ES data without refreshing (`_delete_by_query` in
particular)\r\n\r\nDue to high performance ES architecture data isn't
updated instantly. Having such behavior in tests leads to undetermined
state depending on a number of environmental factors. As UI doesn't
always auto-refreshes to fetch the recent updates in short period of
time test fail. `_delete_by_query` may take some time to update the data
but it doesn't support `refresh=wait_for` as it stated in
[docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html#_refreshing_shards).
Adding `?refresh=true` or just `?refresh` to `_delete_by_query` ES
request urls fixes the problem.\r\n\r\n### What was done to address
mentioned reasons above?\r\n\r\n- Auto-refresh functionality disabled in
tests where it's not necessary.\r\n- `enabled: false` field was added to
rule creators to have disabled rules as the majority of tests don't need
enabled rules.\r\n- `waitForRulesTableToBeLoaded` was removed and
replaced with `expectManagementTableRules` at some tests.\r\n-
`should('not.visible')` replaced with `should('not.exist')` in
`deleteRuleFromDetailsPage()`\r\n- `?refresh` added to
`_delete_by_query` ES data update requests\r\n\r\nThe other changes get
rid of global constants and improve readability.\r\n\r\n## Flaky test
runs\r\n\r\n[All Cypress tests under `detection_response` folder (100
runs)](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2920)
(value lists export is flaky but it's out of scope of this
PR)","sha":"40df5219ea7165e89623afcc22bb0dbc3cc19152"}},"sourceBranch":"main","suggestedTargetBranches":["8.10"],"targetPullRequestStates":[{"branch":"8.10","label":"v8.10.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/164099","number":164099,"mergeCommit":{"message":"[Security
Solution] Reduce Rules Management e2e flakiness (#164099)\n\n**Relates
to: https://github.com/elastic/kibana/issues/161507**\r\n**Fixes:
https://github.com/elastic/kibana/issues/163704**\r\n**Fixes:
https://github.com/elastic/kibana/issues/163182**\r\n**Fixes:
https://github.com/elastic/kibana/issues/163558**\r\n**Fixes:
https://github.com/elastic/kibana/issues/163974**\r\n**Fixes:
https://github.com/elastic/kibana/issues/153914**\r\n**Fixes:
https://github.com/elastic/kibana/issues/164079**\r\n**Fixes:
https://github.com/elastic/kibana/issues/164279**\r\n\r\n##
Summary\r\n\r\nWhile working on fixing Rules Management flaky tests I've
noticed similar fails in different tests. This PR addresses common
pitfalls to reduce a number of reasons causing e2e tests flakiness and
as a result reduce a number of flaky tests.\r\n\r\n## Details\r\n\r\nThe
common reasons causing e2e tests flakiness for the rules tables
are\r\n\r\n- Auto-refresh\r\n\r\nAuto-refresh functionality is enabled
by default and the table gets auto-refreshed every 60 seconds. If a test
takes more than 60 seconds the table fetches updated rules. Having rules
enabled by default and sorted by `Enabled` column makes the sorting
order undetermined and as rules get updated due to execution ES return
them in undetermined order. This update can happen between commands
working on the same element and indexed access like `eq()` would access
different elements. \r\n\r\n- Missing selectors\r\n\r\nSome tests or
helper functions have expectations for an element absence like
`should('not.exist')` without checking an element is visible before like
`should('be.visible')`. This way a referenced element may disappear from
the codebase after refactoring and the expectation still
fulfils.\r\n\r\n- Checking for `should('not.visible')` while an element
is removed from the DOM\r\n\r\nIt most applicable to popovers as it
first animates to be hidden and then removed from the DOM. Cypress first
need to find an element to check its visibility. Replacing
`should('not.visible')` with `should('not.exist')` and taking into
concern from the account previous bullet fixes the problem.\r\n\r\n-
Modifying ES data without refreshing (`_delete_by_query` in
particular)\r\n\r\nDue to high performance ES architecture data isn't
updated instantly. Having such behavior in tests leads to undetermined
state depending on a number of environmental factors. As UI doesn't
always auto-refreshes to fetch the recent updates in short period of
time test fail. `_delete_by_query` may take some time to update the data
but it doesn't support `refresh=wait_for` as it stated in
[docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html#_refreshing_shards).
Adding `?refresh=true` or just `?refresh` to `_delete_by_query` ES
request urls fixes the problem.\r\n\r\n### What was done to address
mentioned reasons above?\r\n\r\n- Auto-refresh functionality disabled in
tests where it's not necessary.\r\n- `enabled: false` field was added to
rule creators to have disabled rules as the majority of tests don't need
enabled rules.\r\n- `waitForRulesTableToBeLoaded` was removed and
replaced with `expectManagementTableRules` at some tests.\r\n-
`should('not.visible')` replaced with `should('not.exist')` in
`deleteRuleFromDetailsPage()`\r\n- `?refresh` added to
`_delete_by_query` ES data update requests\r\n\r\nThe other changes get
rid of global constants and improve readability.\r\n\r\n## Flaky test
runs\r\n\r\n[All Cypress tests under `detection_response` folder (100
runs)](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2920)
(value lists export is flaky but it's out of scope of this
PR)","sha":"40df5219ea7165e89623afcc22bb0dbc3cc19152"}}]}] BACKPORT-->
jpdjere added a commit that referenced this issue Sep 8, 2023
)

**NOTE: This is a manual backport of #164099**

**Original PR description:**
---

**Relates to: #161507
**Fixes: #163704
**Fixes: #163182
**Fixes: #163558
**Fixes: #163974
**Fixes: #153914
**Fixes: #164079
**Fixes: #164279

## Summary

While working on fixing Rules Management flaky tests I've noticed
similar fails in different tests. This PR addresses common pitfalls to
reduce a number of reasons causing e2e tests flakiness and as a result
reduce a number of flaky tests.

## Details

The common reasons causing e2e tests flakiness for the rules tables are

- Auto-refresh

Auto-refresh functionality is enabled by default and the table gets
auto-refreshed every 60 seconds. If a test takes more than 60 seconds
the table fetches updated rules. Having rules enabled by default and
sorted by `Enabled` column makes the sorting order undetermined and as
rules get updated due to execution ES return them in undetermined order.
This update can happen between commands working on the same element and
indexed access like `eq()` would access different elements.

- Missing selectors

Some tests or helper functions have expectations for an element absence
like `should('not.exist')` without checking an element is visible before
like `should('be.visible')`. This way a referenced element may disappear
from the codebase after refactoring and the expectation still fulfils.

- Checking for `should('not.visible')` while an element is removed from
the DOM

It most applicable to popovers as it first animates to be hidden and
then removed from the DOM. Cypress first need to find an element to
check its visibility. Replacing `should('not.visible')` with
`should('not.exist')` and taking into concern from the account previous
bullet fixes the problem.

- Modifying ES data without refreshing (`_delete_by_query` in
particular)

Due to high performance ES architecture data isn't updated instantly.
Having such behavior in tests leads to undetermined state depending on a
number of environmental factors. As UI doesn't always auto-refreshes to
fetch the recent updates in short period of time test fail.
`_delete_by_query` may take some time to update the data but it doesn't
support `refresh=wait_for` as it stated in
[docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html#_refreshing_shards).
Adding `?refresh=true` or just `?refresh` to `_delete_by_query` ES
request urls fixes the problem.

### What was done to address mentioned reasons above?

- Auto-refresh functionality disabled in tests where it's not necessary.
- `enabled: false` field was added to rule creators to have disabled
rules as the majority of tests don't need enabled rules.
- `waitForRulesTableToBeLoaded` was removed and replaced with
`expectManagementTableRules` at some tests.
- `should('not.visible')` replaced with `should('not.exist')` in
`deleteRuleFromDetailsPage()`
- `?refresh` added to `_delete_by_query` ES data update requests

The other changes get rid of global constants and improve readability.

## Flaky test runs

[All Cypress tests under `detection_response` folder (100
runs)](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2920)
(value lists export is flaky but it's out of scope of this PR)

---------

Co-authored-by: kibanamachine <[email protected]>
@kibanamachine kibanamachine reopened this Nov 10, 2023
@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

maximpn pushed a commit that referenced this issue Nov 17, 2023
…·ts` by disabling auto refresh (#171414)

Fixes: #164279

## Summary

- Fixes flake reported in `x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_selection·cy·ts`.
- `selectNumberOfRules` helper is known to fail when the focus on a checkbox is lost due to reordering of the rules table due to an autorefresh taking place.
- This PRs disables autorefresh to prevent that.

## Flaky test runner

- https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4015

## 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)
jpdjere added a commit to jpdjere/kibana that referenced this issue Nov 22, 2023
…·ts` by disabling auto refresh (elastic#171414)

Fixes: elastic#164279

## Summary

- Fixes flake reported in `x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_selection·cy·ts`.
- `selectNumberOfRules` helper is known to fail when the focus on a checkbox is lost due to reordering of the rules table due to an autorefresh taking place.
- This PRs disables autorefresh to prevent that.

## Flaky test runner

- https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4015

## 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 d727eae)

# Conflicts:
#	x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_selection.cy.ts
janmonschke referenced this issue in janmonschke/kibana Nov 23, 2023
…tion·cy·ts` by disabling auto refresh (elastic#171414) (elastic#171715)

# Backport

This will backport the following commits from `main` to `8.11`:
- [[Security Solution] Fixes flaky Cypres test
`rules_table_selection·cy·ts` by disabling auto refresh
(elastic#171414)](elastic#171414)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT [{"author":{"name":"Juan Pablo
Djeredjian","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-11-17T09:27:06Z","message":"[Security
Solution] Fixes flaky Cypres test `rules_table_selection·cy·ts` by
disabling auto refresh (elastic#171414)\n\nFixes:
https://github.com/elastic/kibana/issues/164279\r\n\r\n##
Summary\r\n\r\n- Fixes flake reported in
`x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_selection·cy·ts`.\r\n-
`selectNumberOfRules` helper is known to fail when the focus on a
checkbox is lost due to reordering of the rules table due to an
autorefresh taking place.\r\n- This PRs disables autorefresh to prevent
that.\r\n\r\n## Flaky test runner\r\n\r\n-
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4015\r\n\r\n##
For maintainers\r\n\r\n- [ ] 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)","sha":"d727eae163c1e2502ab707e47f4e4820c3b4c751","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","failed-test","release_note:skip","backport:skip","Team:Detections
and Resp","Team: SecuritySolution","Team:Detection Rule
Management","v8.12.0"],"number":171414,"url":"https://github.com/elastic/kibana/pull/171414","mergeCommit":{"message":"[Security
Solution] Fixes flaky Cypres test `rules_table_selection·cy·ts` by
disabling auto refresh (elastic#171414)\n\nFixes:
https://github.com/elastic/kibana/issues/164279\r\n\r\n##
Summary\r\n\r\n- Fixes flake reported in
`x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_selection·cy·ts`.\r\n-
`selectNumberOfRules` helper is known to fail when the focus on a
checkbox is lost due to reordering of the rules table due to an
autorefresh taking place.\r\n- This PRs disables autorefresh to prevent
that.\r\n\r\n## Flaky test runner\r\n\r\n-
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4015\r\n\r\n##
For maintainers\r\n\r\n- [ ] 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)","sha":"d727eae163c1e2502ab707e47f4e4820c3b4c751"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/171414","number":171414,"mergeCommit":{"message":"[Security
Solution] Fixes flaky Cypres test `rules_table_selection·cy·ts` by
disabling auto refresh (elastic#171414)\n\nFixes:
https://github.com/elastic/kibana/issues/164279\r\n\r\n##
Summary\r\n\r\n- Fixes flake reported in
`x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_selection·cy·ts`.\r\n-
`selectNumberOfRules` helper is known to fail when the focus on a
checkbox is lost due to reordering of the rules table due to an
autorefresh taking place.\r\n- This PRs disables autorefresh to prevent
that.\r\n\r\n## Flaky test runner\r\n\r\n-
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4015\r\n\r\n##
For maintainers\r\n\r\n- [ ] 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)","sha":"d727eae163c1e2502ab707e47f4e4820c3b4c751"}}]}]
BACKPORT-->

---------

Co-authored-by: Kibana Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.12 candidate failed-test A test failure on a tracked branch, potentially flaky-test Feature:Rule Management Security Solution Detection Rule Management area Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.
Projects
None yet
5 participants