-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Cases] Fix case view flaky tests #160412
Conversation
Pinging @elastic/response-ops (Team:ResponseOps) |
Pinging @elastic/response-ops-cases (Feature:Cases) |
expect(result.getByTestId('case-view-status-dropdown')).toHaveTextContent('Closed'); | ||
}); | ||
|
||
it('should update status', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was flaky. We have an e2e for that.
}); | ||
}); | ||
|
||
it('should update title', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was flaky. We have an e2e for that.
|
||
it('should update connector', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was flaky. We already test this scenario in the x-pack/plugins/cases/public/components/edit_connector/connectors_form.test.tsx
file.
}); | ||
}); | ||
|
||
it.skip('it should persist the draft of new comment while description is updated', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too slow. Moved it as an e2e (skipped).
}); | ||
|
||
describe('breadcrumbs', () => { | ||
it('should set the cases title', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was flaky. We have an e2e for that.
f3efff4
to
e344caa
Compare
e344caa
to
abaead4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes looks good, thanks for doing this!! 👍
* where this test randomly reproduces thus making the test flaky. | ||
* Skipping for now until we fix it. | ||
*/ | ||
it.skip('should persist the draft of new comment while description is updated', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will fix it in a separate PR, there is already an issue for it. #151845
expect(result.container.querySelector('.euiCallOut--danger')).not.toBeInTheDocument(); | ||
expect(await screen.findByTestId('edit-connectors')).toBeInTheDocument(); | ||
expect( | ||
screen.queryByTestId('case-callout-a25a5b368b6409b179ef4b6c5168244f') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the test id stay the same across test runs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I discovered that yes! The footprint of this callout is the same. This is the expected behavior.
@@ -90,7 +90,7 @@ export const EditConnector = React.memo( | |||
!needsToBePushed; | |||
|
|||
return ( | |||
<EuiFlexItem grow={false}> | |||
<EuiFlexItem grow={false} data-test-subj="sidebar-connectors"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe prefix these with cases-
* fast to the cases table and the comment is not | ||
* persisted | ||
*/ | ||
await setTimeoutAsync(2000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💚 Build Succeeded
Metrics [docs]Async chunks
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @cnasikas |
## Summary This PR fixes flaky tests in `x-pack/plugins/cases/public/components/case_view/case_view_page.test.tsx`. Some of them were converted to an e2e test as they were too slow to be on a unit test. Successful runs: - elastic@a4ed839 (50 times) - elastic@82ccceb (45 times) - elastic@43c47e6 (20 times) Fixes: elastic#149775, elastic#149776, elastic#149777, elastic#149778, elastic#149779, elastic#149780, elastic#149781, elastic#149782, elastic#153335, elastic#153336, elastic#149773, elastic#149774, elastic#149772, elastic#149771, elastic#149770, elastic#149769, elastic#151845, elastic#153336, elastic#153335 Flaky test runner: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2500 ### Checklist Delete any items that are not applicable to this PR. - [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 - [x] 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 c0047a1)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.9`: - [[Cases] Fix case view flaky tests (#160412)](#160412) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Christos Nasikas","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-06-27T13:57:30Z","message":"[Cases] Fix case view flaky tests (#160412)\n\n## Summary\r\n\r\nThis PR fixes flaky tests in\r\n`x-pack/plugins/cases/public/components/case_view/case_view_page.test.tsx`.\r\nSome of them were converted to an e2e test as they were too slow to be\r\non a unit test.\r\n\r\nSuccessful runs: \r\n\r\n-\r\nhttps://github.com//pull/160412/commits/a4ed8390d45b628ee4328c3655164c94449e3dc8\r\n(50 times)\r\n-\r\nhttps://github.com//pull/160412/commits/82ccceb03aff6f74cd30f80fcaaa0f2b99c28103\r\n(45 times)\r\n-\r\nhttps://github.com//pull/160412/commits/43c47e645b26561c00de97e8a4d965b435a5491b\r\n(20 times)\r\n\r\nFixes: https://github.com/elastic/kibana/issues/149775,\r\nhttps://github.com/elastic/kibana/issues/149776,\r\nhttps://github.com/elastic/kibana/issues/149777,\r\nhttps://github.com/elastic/kibana/issues/149778,\r\nhttps://github.com/elastic/kibana/issues/149779,\r\nhttps://github.com/elastic/kibana/issues/149780,\r\nhttps://github.com/elastic/kibana/issues/149781,\r\nhttps://github.com/elastic/kibana/issues/149782,\r\nhttps://github.com/elastic/kibana/issues/153335,\r\nhttps://github.com/elastic/kibana/issues/153336,\r\nhttps://github.com/elastic/kibana/issues/149773,\r\nhttps://github.com/elastic/kibana/issues/149774,\r\nhttps://github.com/elastic/kibana/issues/149772,\r\nhttps://github.com/elastic/kibana/issues/149771,\r\nhttps://github.com/elastic/kibana/issues/149770,\r\nhttps://github.com/elastic/kibana/issues/149769,\r\nhttps://github.com/elastic/kibana/issues/151845,\r\nhttps://github.com/elastic/kibana/issues/153336,\r\nhttps://github.com/elastic/kibana/issues/153335\r\n\r\nFlaky test runner:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2500\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\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### For maintainers\r\n\r\n- [x] 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":"c0047a1b94d898a16e4a5aad94663f07b5b06e52","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","Feature:Cases","v8.9.0","v8.10.0"],"number":160412,"url":"https://github.com/elastic/kibana/pull/160412","mergeCommit":{"message":"[Cases] Fix case view flaky tests (#160412)\n\n## Summary\r\n\r\nThis PR fixes flaky tests in\r\n`x-pack/plugins/cases/public/components/case_view/case_view_page.test.tsx`.\r\nSome of them were converted to an e2e test as they were too slow to be\r\non a unit test.\r\n\r\nSuccessful runs: \r\n\r\n-\r\nhttps://github.com//pull/160412/commits/a4ed8390d45b628ee4328c3655164c94449e3dc8\r\n(50 times)\r\n-\r\nhttps://github.com//pull/160412/commits/82ccceb03aff6f74cd30f80fcaaa0f2b99c28103\r\n(45 times)\r\n-\r\nhttps://github.com//pull/160412/commits/43c47e645b26561c00de97e8a4d965b435a5491b\r\n(20 times)\r\n\r\nFixes: https://github.com/elastic/kibana/issues/149775,\r\nhttps://github.com/elastic/kibana/issues/149776,\r\nhttps://github.com/elastic/kibana/issues/149777,\r\nhttps://github.com/elastic/kibana/issues/149778,\r\nhttps://github.com/elastic/kibana/issues/149779,\r\nhttps://github.com/elastic/kibana/issues/149780,\r\nhttps://github.com/elastic/kibana/issues/149781,\r\nhttps://github.com/elastic/kibana/issues/149782,\r\nhttps://github.com/elastic/kibana/issues/153335,\r\nhttps://github.com/elastic/kibana/issues/153336,\r\nhttps://github.com/elastic/kibana/issues/149773,\r\nhttps://github.com/elastic/kibana/issues/149774,\r\nhttps://github.com/elastic/kibana/issues/149772,\r\nhttps://github.com/elastic/kibana/issues/149771,\r\nhttps://github.com/elastic/kibana/issues/149770,\r\nhttps://github.com/elastic/kibana/issues/149769,\r\nhttps://github.com/elastic/kibana/issues/151845,\r\nhttps://github.com/elastic/kibana/issues/153336,\r\nhttps://github.com/elastic/kibana/issues/153335\r\n\r\nFlaky test runner:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2500\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\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### For maintainers\r\n\r\n- [x] 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":"c0047a1b94d898a16e4a5aad94663f07b5b06e52"}},"sourceBranch":"main","suggestedTargetBranches":["8.9"],"targetPullRequestStates":[{"branch":"8.9","label":"v8.9.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/160412","number":160412,"mergeCommit":{"message":"[Cases] Fix case view flaky tests (#160412)\n\n## Summary\r\n\r\nThis PR fixes flaky tests in\r\n`x-pack/plugins/cases/public/components/case_view/case_view_page.test.tsx`.\r\nSome of them were converted to an e2e test as they were too slow to be\r\non a unit test.\r\n\r\nSuccessful runs: \r\n\r\n-\r\nhttps://github.com//pull/160412/commits/a4ed8390d45b628ee4328c3655164c94449e3dc8\r\n(50 times)\r\n-\r\nhttps://github.com//pull/160412/commits/82ccceb03aff6f74cd30f80fcaaa0f2b99c28103\r\n(45 times)\r\n-\r\nhttps://github.com//pull/160412/commits/43c47e645b26561c00de97e8a4d965b435a5491b\r\n(20 times)\r\n\r\nFixes: https://github.com/elastic/kibana/issues/149775,\r\nhttps://github.com/elastic/kibana/issues/149776,\r\nhttps://github.com/elastic/kibana/issues/149777,\r\nhttps://github.com/elastic/kibana/issues/149778,\r\nhttps://github.com/elastic/kibana/issues/149779,\r\nhttps://github.com/elastic/kibana/issues/149780,\r\nhttps://github.com/elastic/kibana/issues/149781,\r\nhttps://github.com/elastic/kibana/issues/149782,\r\nhttps://github.com/elastic/kibana/issues/153335,\r\nhttps://github.com/elastic/kibana/issues/153336,\r\nhttps://github.com/elastic/kibana/issues/149773,\r\nhttps://github.com/elastic/kibana/issues/149774,\r\nhttps://github.com/elastic/kibana/issues/149772,\r\nhttps://github.com/elastic/kibana/issues/149771,\r\nhttps://github.com/elastic/kibana/issues/149770,\r\nhttps://github.com/elastic/kibana/issues/149769,\r\nhttps://github.com/elastic/kibana/issues/151845,\r\nhttps://github.com/elastic/kibana/issues/153336,\r\nhttps://github.com/elastic/kibana/issues/153335\r\n\r\nFlaky test runner:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2500\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\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### For maintainers\r\n\r\n- [x] 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":"c0047a1b94d898a16e4a5aad94663f07b5b06e52"}}]}] BACKPORT--> Co-authored-by: Christos Nasikas <[email protected]>
Summary
This PR fixes flaky tests in
x-pack/plugins/cases/public/components/case_view/case_view_page.test.tsx
. Some of them were converted to an e2e test as they were too slow to be on a unit test.Successful runs:
Fixes: #149775, #149776, #149777, #149778, #149779, #149780, #149781, #149782, #153335, #153336, #149773, #149774, #149772, #149771, #149770, #149769, #151845, #153336, #153335
Flaky test runner: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2500
Checklist
Delete any items that are not applicable to this PR.
For maintainers