[Security Solution] [Detections] Fixes flakey exceptions read-only viewer cypress test#162839
Merged
dhurley14 merged 24 commits intoelastic:mainfrom Aug 12, 2023
Merged
Conversation
…ad only cypress test for flakey test runner
…json code for flakey test runner
…test that ran before it in the initial failure report
…g source of flake for read_only_view exceptions test
yctercero
reviewed
Aug 11, 2023
|
|
||
| export const goToRuleDetails = () => { | ||
| cy.get(RULE_NAME).first().click(); | ||
| cy.get(RULE_NAME).first().click({ force: true }); |
Contributor
There was a problem hiding this comment.
Nit: do we have to have this force: true here? I think we're moving towards trying to get rid of use of this in the future.
Contributor
Author
There was a problem hiding this comment.
ah we probably do not need the force true. Thanks!
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @dhurley14 |
yctercero
approved these changes
Aug 12, 2023
Contributor
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
Contributor
Author
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
dhurley14
added a commit
to dhurley14/kibana
that referenced
this pull request
Aug 12, 2023
…ewer cypress test (elastic#162839) ## Summary Ref: elastic#162569 The test was trying to load the exceptions tab before the rule details page loaded. Now we wait for the rule tab to load before continuing. Something I was unaware of was that `cy.url()` will [automatically retry](https://docs.cypress.io/api/commands/url#Assertions) until all chained assertions have passed, which I think can be an easy way to fix future flake issues where cypress tries to click on an element before the new page loads. (cherry picked from commit 7b3cc8f) # Conflicts: # x-pack/plugins/security_solution/cypress/e2e/exceptions/rule_details_flow/read_only_view.cy.ts
dhurley14
added a commit
that referenced
this pull request
Aug 12, 2023
…nly viewer cypress test (#162839) (#163766) # Backport This will backport the following commits from `main` to `8.9`: - [[Security Solution] [Detections] Fixes flakey exceptions read-only viewer cypress test (#162839)](#162839) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Devin W. Hurley","email":"devin.hurley@elastic.co"},"sourceCommit":{"committedDate":"2023-08-12T03:35:20Z","message":"[Security Solution] [Detections] Fixes flakey exceptions read-only viewer cypress test (#162839)\n\n## Summary\r\n\r\nRef: https://github.com/elastic/kibana/issues/162569\r\n\r\nThe test was trying to load the exceptions tab before the rule details\r\npage loaded. Now we wait for the rule tab to load before continuing.\r\nSomething I was unaware of was that `cy.url()` will [automatically\r\nretry](https://docs.cypress.io/api/commands/url#Assertions) until all\r\nchained assertions have passed, which I think can be an easy way to fix\r\nfuture flake issues where cypress tries to click on an element before\r\nthe new page loads.","sha":"7b3cc8f5735306d13113b0f75499f386fc0aec48","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["review","release_note:skip","Team:Detection Engine","v8.10.0","v8.9.2"],"number":162839,"url":"https://github.com/elastic/kibana/pull/162839","mergeCommit":{"message":"[Security Solution] [Detections] Fixes flakey exceptions read-only viewer cypress test (#162839)\n\n## Summary\r\n\r\nRef: https://github.com/elastic/kibana/issues/162569\r\n\r\nThe test was trying to load the exceptions tab before the rule details\r\npage loaded. Now we wait for the rule tab to load before continuing.\r\nSomething I was unaware of was that `cy.url()` will [automatically\r\nretry](https://docs.cypress.io/api/commands/url#Assertions) until all\r\nchained assertions have passed, which I think can be an easy way to fix\r\nfuture flake issues where cypress tries to click on an element before\r\nthe new page loads.","sha":"7b3cc8f5735306d13113b0f75499f386fc0aec48"}},"sourceBranch":"main","suggestedTargetBranches":["8.9"],"targetPullRequestStates":[{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/162839","number":162839,"mergeCommit":{"message":"[Security Solution] [Detections] Fixes flakey exceptions read-only viewer cypress test (#162839)\n\n## Summary\r\n\r\nRef: https://github.com/elastic/kibana/issues/162569\r\n\r\nThe test was trying to load the exceptions tab before the rule details\r\npage loaded. Now we wait for the rule tab to load before continuing.\r\nSomething I was unaware of was that `cy.url()` will [automatically\r\nretry](https://docs.cypress.io/api/commands/url#Assertions) until all\r\nchained assertions have passed, which I think can be an easy way to fix\r\nfuture flake issues where cypress tries to click on an element before\r\nthe new page loads.","sha":"7b3cc8f5735306d13113b0f75499f386fc0aec48"}},{"branch":"8.9","label":"v8.9.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
jughosta
pushed a commit
to jughosta/kibana
that referenced
this pull request
Aug 14, 2023
…ewer cypress test (elastic#162839) ## Summary Ref: elastic#162569 The test was trying to load the exceptions tab before the rule details page loaded. Now we wait for the rule tab to load before continuing. Something I was unaware of was that `cy.url()` will [automatically retry](https://docs.cypress.io/api/commands/url#Assertions) until all chained assertions have passed, which I think can be an easy way to fix future flake issues where cypress tries to click on an element before the new page loads.
Contributor
|
This pr didn't make it into the build candidate for v8.9.1. Updating the labels. |
e40pud
added a commit
to e40pud/kibana
that referenced
this pull request
Aug 21, 2023
…ewer cypress test (elastic#162839)
e40pud
added a commit
that referenced
this pull request
Aug 21, 2023
…ewer cypress test (#164283) ## Summary Fixes: #162569 Fixes: #164061 Fixes: #164058 Fixes: #163546 Fixes: #162669 We tried to fix the issue with this PR #162839 but test failed again. This is another attempt to fix it using the @jpdjere's approach where we disable rule's table refreshing (#163698).
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Aug 21, 2023
…ewer cypress test (elastic#164283) ## Summary Fixes: elastic#162569 Fixes: elastic#164061 Fixes: elastic#164058 Fixes: elastic#163546 Fixes: elastic#162669 We tried to fix the issue with this PR elastic#162839 but test failed again. This is another attempt to fix it using the @jpdjere's approach where we disable rule's table refreshing (elastic#163698). (cherry picked from commit 4477f64)
kibanamachine
added a commit
that referenced
this pull request
Aug 21, 2023
…only viewer cypress test (#164283) (#164346) # Backport This will backport the following commits from `main` to `8.10`: - [[Security Solution] [Detections] Fixes flakey exceptions read-only viewer cypress test (#164283)](#164283) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Ievgen Sorokopud","email":"ievgen.sorokopud@elastic.co"},"sourceCommit":{"committedDate":"2023-08-21T18:40:14Z","message":"[Security Solution] [Detections] Fixes flakey exceptions read-only viewer cypress test (#164283)\n\n## Summary\r\n\r\nFixes: https://github.com/elastic/kibana/issues/162569\r\nFixes: https://github.com/elastic/kibana/issues/164061\r\nFixes: https://github.com/elastic/kibana/issues/164058\r\nFixes: https://github.com/elastic/kibana/issues/163546\r\nFixes: https://github.com/elastic/kibana/issues/162669\r\n\r\nWe tried to fix the issue with this PR\r\nhttps://github.com//pull/162839 but test failed again.\r\n\r\nThis is another attempt to fix it using the @jpdjere's approach where we\r\ndisable rule's table refreshing\r\n(https://github.com/elastic/kibana/pull/163698).","sha":"4477f642e3297355ef676dcf485efb0cb49c4fcb","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team: SecuritySolution","Team:Detection Engine","v8.10.0","v8.11.0"],"number":164283,"url":"https://github.com/elastic/kibana/pull/164283","mergeCommit":{"message":"[Security Solution] [Detections] Fixes flakey exceptions read-only viewer cypress test (#164283)\n\n## Summary\r\n\r\nFixes: https://github.com/elastic/kibana/issues/162569\r\nFixes: https://github.com/elastic/kibana/issues/164061\r\nFixes: https://github.com/elastic/kibana/issues/164058\r\nFixes: https://github.com/elastic/kibana/issues/163546\r\nFixes: https://github.com/elastic/kibana/issues/162669\r\n\r\nWe tried to fix the issue with this PR\r\nhttps://github.com//pull/162839 but test failed again.\r\n\r\nThis is another attempt to fix it using the @jpdjere's approach where we\r\ndisable rule's table refreshing\r\n(https://github.com/elastic/kibana/pull/163698).","sha":"4477f642e3297355ef676dcf485efb0cb49c4fcb"}},"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/164283","number":164283,"mergeCommit":{"message":"[Security Solution] [Detections] Fixes flakey exceptions read-only viewer cypress test (#164283)\n\n## Summary\r\n\r\nFixes: https://github.com/elastic/kibana/issues/162569\r\nFixes: https://github.com/elastic/kibana/issues/164061\r\nFixes: https://github.com/elastic/kibana/issues/164058\r\nFixes: https://github.com/elastic/kibana/issues/163546\r\nFixes: https://github.com/elastic/kibana/issues/162669\r\n\r\nWe tried to fix the issue with this PR\r\nhttps://github.com//pull/162839 but test failed again.\r\n\r\nThis is another attempt to fix it using the @jpdjere's approach where we\r\ndisable rule's table refreshing\r\n(https://github.com/elastic/kibana/pull/163698).","sha":"4477f642e3297355ef676dcf485efb0cb49c4fcb"}}]}] BACKPORT--> Co-authored-by: Ievgen Sorokopud <ievgen.sorokopud@elastic.co>
e40pud
added a commit
to e40pud/kibana
that referenced
this pull request
Aug 21, 2023
…ewer cypress test (elastic#164283) ## Summary Fixes: elastic#162569 Fixes: elastic#164061 Fixes: elastic#164058 Fixes: elastic#163546 Fixes: elastic#162669 We tried to fix the issue with this PR elastic#162839 but test failed again. This is another attempt to fix it using the @jpdjere's approach where we disable rule's table refreshing (elastic#163698). (cherry picked from commit 4477f64)
e40pud
added a commit
that referenced
this pull request
Aug 22, 2023
…nly viewer cypress test (#164283) (#164352) # Backport This will backport the following commits from `main` to `8.9`: - [[Security Solution] [Detections] Fixes flakey exceptions read-only viewer cypress test (#164283)](#164283) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Ievgen Sorokopud","email":"ievgen.sorokopud@elastic.co"},"sourceCommit":{"committedDate":"2023-08-21T18:40:14Z","message":"[Security Solution] [Detections] Fixes flakey exceptions read-only viewer cypress test (#164283)\n\n## Summary\r\n\r\nFixes: https://github.com/elastic/kibana/issues/162569\r\nFixes: https://github.com/elastic/kibana/issues/164061\r\nFixes: https://github.com/elastic/kibana/issues/164058\r\nFixes: https://github.com/elastic/kibana/issues/163546\r\nFixes: https://github.com/elastic/kibana/issues/162669\r\n\r\nWe tried to fix the issue with this PR\r\nhttps://github.com//pull/162839 but test failed again.\r\n\r\nThis is another attempt to fix it using the @jpdjere's approach where we\r\ndisable rule's table refreshing\r\n(https://github.com/elastic/kibana/pull/163698).","sha":"4477f642e3297355ef676dcf485efb0cb49c4fcb","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team: SecuritySolution","Team:Detection Engine","v8.10.0","v8.11.0"],"number":164283,"url":"https://github.com/elastic/kibana/pull/164283","mergeCommit":{"message":"[Security Solution] [Detections] Fixes flakey exceptions read-only viewer cypress test (#164283)\n\n## Summary\r\n\r\nFixes: https://github.com/elastic/kibana/issues/162569\r\nFixes: https://github.com/elastic/kibana/issues/164061\r\nFixes: https://github.com/elastic/kibana/issues/164058\r\nFixes: https://github.com/elastic/kibana/issues/163546\r\nFixes: https://github.com/elastic/kibana/issues/162669\r\n\r\nWe tried to fix the issue with this PR\r\nhttps://github.com//pull/162839 but test failed again.\r\n\r\nThis is another attempt to fix it using the @jpdjere's approach where we\r\ndisable rule's table refreshing\r\n(https://github.com/elastic/kibana/pull/163698).","sha":"4477f642e3297355ef676dcf485efb0cb49c4fcb"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"8.10","label":"v8.10.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/164346","number":164346,"state":"MERGED","mergeCommit":{"sha":"bdbc3e7e0e7cf59397af3653ed2f8ba86bd3ea93","message":"[8.10] [Security Solution] [Detections] Fixes flakey exceptions read-only viewer cypress test (#164283) (#164346)\n\n# Backport\n\nThis will backport the following commits from `main` to `8.10`:\n- [[Security Solution] [Detections] Fixes flakey exceptions read-only\nviewer cypress test\n(#164283)](https://github.com/elastic/kibana/pull/164283)\n\n<!--- Backport version: 8.9.7 -->\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT [{\"author\":{\"name\":\"Ievgen\nSorokopud\",\"email\":\"ievgen.sorokopud@elastic.co\"},\"sourceCommit\":{\"committedDate\":\"2023-08-21T18:40:14Z\",\"message\":\"[Security\nSolution] [Detections] Fixes flakey exceptions read-only viewer cypress\ntest (#164283)\\n\\n## Summary\\r\\n\\r\\nFixes:\nhttps://github.com//issues/162569\\r\\nFixes:\nhttps://github.com//issues/164061\\r\\nFixes:\nhttps://github.com//issues/164058\\r\\nFixes:\nhttps://github.com//issues/163546\\r\\nFixes:\nhttps://github.com//issues/162669\\r\\n\\r\\nWe tried to fix\nthe issue with this PR\\r\\nhttps://github.com//pull/162839\nbut test failed again.\\r\\n\\r\\nThis is another attempt to fix it using\nthe @jpdjere's approach where we\\r\\ndisable rule's table\nrefreshing\\r\\n(https://github.com/elastic/kibana/pull/163698).\",\"sha\":\"4477f642e3297355ef676dcf485efb0cb49c4fcb\",\"branchLabelMapping\":{\"^v8.11.0$\":\"main\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"release_note:skip\",\"Team:\nSecuritySolution\",\"Team:Detection\nEngine\",\"v8.10.0\",\"v8.11.0\"],\"number\":164283,\"url\":\"https://github.com/elastic/kibana/pull/164283\",\"mergeCommit\":{\"message\":\"[Security\nSolution] [Detections] Fixes flakey exceptions read-only viewer cypress\ntest (#164283)\\n\\n## Summary\\r\\n\\r\\nFixes:\nhttps://github.com//issues/162569\\r\\nFixes:\nhttps://github.com//issues/164061\\r\\nFixes:\nhttps://github.com//issues/164058\\r\\nFixes:\nhttps://github.com//issues/163546\\r\\nFixes:\nhttps://github.com//issues/162669\\r\\n\\r\\nWe tried to fix\nthe issue with this PR\\r\\nhttps://github.com//pull/162839\nbut test failed again.\\r\\n\\r\\nThis is another attempt to fix it using\nthe @jpdjere's approach where we\\r\\ndisable rule's table\nrefreshing\\r\\n(https://github.com/elastic/kibana/pull/163698).\",\"sha\":\"4477f642e3297355ef676dcf485efb0cb49c4fcb\"}},\"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/164283\",\"number\":164283,\"mergeCommit\":{\"message\":\"[Security\nSolution] [Detections] Fixes flakey exceptions read-only viewer cypress\ntest (#164283)\\n\\n## Summary\\r\\n\\r\\nFixes:\nhttps://github.com//issues/162569\\r\\nFixes:\nhttps://github.com//issues/164061\\r\\nFixes:\nhttps://github.com//issues/164058\\r\\nFixes:\nhttps://github.com//issues/163546\\r\\nFixes:\nhttps://github.com//issues/162669\\r\\n\\r\\nWe tried to fix\nthe issue with this PR\\r\\nhttps://github.com//pull/162839\nbut test failed again.\\r\\n\\r\\nThis is another attempt to fix it using\nthe @jpdjere's approach where we\\r\\ndisable rule's table\nrefreshing\\r\\n(https://github.com/elastic/kibana/pull/163698).\",\"sha\":\"4477f642e3297355ef676dcf485efb0cb49c4fcb\"}}]}]\nBACKPORT-->\n\nCo-authored-by: Ievgen Sorokopud <ievgen.sorokopud@elastic.co>"}},{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/164283","number":164283,"mergeCommit":{"message":"[Security Solution] [Detections] Fixes flakey exceptions read-only viewer cypress test (#164283)\n\n## Summary\r\n\r\nFixes: https://github.com/elastic/kibana/issues/162569\r\nFixes: https://github.com/elastic/kibana/issues/164061\r\nFixes: https://github.com/elastic/kibana/issues/164058\r\nFixes: https://github.com/elastic/kibana/issues/163546\r\nFixes: https://github.com/elastic/kibana/issues/162669\r\n\r\nWe tried to fix the issue with this PR\r\nhttps://github.com//pull/162839 but test failed again.\r\n\r\nThis is another attempt to fix it using the @jpdjere's approach where we\r\ndisable rule's table refreshing\r\n(https://github.com/elastic/kibana/pull/163698).","sha":"4477f642e3297355ef676dcf485efb0cb49c4fcb"}}]}] BACKPORT-->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ref: #162569
The test was trying to load the exceptions tab before the rule details page loaded. Now we wait for the rule tab to load before continuing. Something I was unaware of was that
cy.url()will automatically retry until all chained assertions have passed, which I think can be an easy way to fix future flake issues where cypress tries to click on an element before the new page loads.