Skip to content

Commit

Permalink
Fix flaky test (elastic#152650)
Browse files Browse the repository at this point in the history
## Summary

Fixes: elastic#148469,
elastic#148468

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

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

---------

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
2 people authored and bmorelli25 committed Mar 10, 2023
1 parent 709872f commit 90fb8fb
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 90fb8fb

Please sign in to comment.