Skip to content

Commit

Permalink
[8.7] Fix flaky test (#152650) (#152709)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.7`:
- [Fix flaky test
(#152650)](#152650)

<!--- 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-03-06T13:29:58Z","message":"Fix
flaky test (#152650)\n\n## Summary\r\n\r\nFixes:
https://github.com/elastic/kibana/issues/148469,\r\nhttps://github.com/elastic/kibana/issues/148468\r\n\r\nFlaky
test
runner:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1981\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)\r\n\r\n---------\r\n\r\nCo-authored-by:
Kibana Machine
<[email protected]>","sha":"93fbaee4f460cd7d610d235f738d03aed1f8ba42","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","Feature:Cases","backport:prev-minor","v8.8.0"],"number":152650,"url":"https://github.com/elastic/kibana/pull/152650","mergeCommit":{"message":"Fix
flaky test (#152650)\n\n## Summary\r\n\r\nFixes:
https://github.com/elastic/kibana/issues/148469,\r\nhttps://github.com/elastic/kibana/issues/148468\r\n\r\nFlaky
test
runner:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1981\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)\r\n\r\n---------\r\n\r\nCo-authored-by:
Kibana Machine
<[email protected]>","sha":"93fbaee4f460cd7d610d235f738d03aed1f8ba42"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/152650","number":152650,"mergeCommit":{"message":"Fix
flaky test (#152650)\n\n## Summary\r\n\r\nFixes:
https://github.com/elastic/kibana/issues/148469,\r\nhttps://github.com/elastic/kibana/issues/148468\r\n\r\nFlaky
test
runner:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1981\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)\r\n\r\n---------\r\n\r\nCo-authored-by:
Kibana Machine
<[email protected]>","sha":"93fbaee4f460cd7d610d235f738d03aed1f8ba42"}}]}]
BACKPORT-->

Co-authored-by: Christos Nasikas <[email protected]>
  • Loading branch information
kibanamachine and cnasikas authored Mar 6, 2023
1 parent 5178d15 commit f34fe63
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,12 @@ const ActionColumnComponent: React.FC<{ theCase: Case; disableActions: boolean }
panelPaddingSize="none"
anchorPosition="downLeft"
>
<EuiContextMenu initialPanelId={0} panels={panels} key={`case-action-menu-${theCase.id}`} />
<EuiContextMenu
initialPanelId={0}
panels={panels}
key={`case-action-menu-${theCase.id}`}
data-test-subj={`case-action-menu-${theCase.id}`}
/>
</EuiPopover>
{deleteAction.isModalVisible ? (
<ConfirmDeleteCaseModal
Expand Down
10 changes: 6 additions & 4 deletions x-pack/test/functional/services/cases/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,10 @@ export function CasesTableServiceProvider(
async changeStatus(status: CaseStatuses, index: number) {
await this.openRowActions(index);

await testSubjects.existOrFail('cases-bulk-action-delete');
await retry.waitFor('status panel exists', async () => {
return find.existsByCssSelector('[data-test-subj*="case-action-status-panel-"');
});

await find.existsByCssSelector('[data-test-subj*="case-action-status-panel-"');
const statusButton = await find.byCssSelector('[data-test-subj*="case-action-status-panel-"');

statusButton.click();
Expand All @@ -218,9 +219,10 @@ export function CasesTableServiceProvider(
async changeSeverity(severity: CaseSeverity, index: number) {
await this.openRowActions(index);

await testSubjects.existOrFail('cases-bulk-action-delete');
await retry.waitFor('severity panel exists', async () => {
return find.existsByCssSelector('[data-test-subj*="case-action-severity-panel-"');
});

await find.existsByCssSelector('[data-test-subj*="case-action-severity-panel-"');
const statusButton = await find.byCssSelector(
'[data-test-subj*="case-action-severity-panel-"'
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -590,9 +590,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
});
});

// FLAKY: https://github.com/elastic/kibana/issues/148468
// FLAKY: https://github.com/elastic/kibana/issues/148469
describe.skip('Severity', () => {
describe('Severity', () => {
before(async () => {
await cases.api.createNthRandomCases(1);
await header.waitUntilLoadingHasFinished();
Expand Down

0 comments on commit f34fe63

Please sign in to comment.