Skip to content

Commit

Permalink
[Cases] Fix filtering e2e flaky tests (elastic#170383)
Browse files Browse the repository at this point in the history
  • Loading branch information
cnasikas authored Nov 2, 2023
1 parent 8133f01 commit 8ced30d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 4 additions & 3 deletions x-pack/test/functional/services/cases/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* 2.0.
*/

import expect from '@kbn/expect';
import { CaseSeverityWithAll } from '@kbn/cases-plugin/common/ui';
import { CaseSeverity, CaseStatuses } from '@kbn/cases-plugin/common/types/domain';
import { WebElementWrapper } from '../../../../../test/functional/services/lib/web_element_wrapper';
Expand Down Expand Up @@ -85,10 +84,12 @@ export function CasesTableServiceProvider(
},

async validateCasesTableHasNthRows(nrRows: number) {
await retry.tryForTime(3000, async () => {
await retry.waitFor(`the cases table to have ${nrRows} cases`, async () => {
const rows = await find.allByCssSelector('[data-test-subj*="cases-table-row-"');
expect(rows.length).equal(nrRows);
return rows.length === nrRows;
});

await header.waitUntilLoadingHasFinished();
},

async waitForCasesToBeListed() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
});
});

// FLAKY: https://github.com/elastic/kibana/issues/152925
describe.skip('filtering', () => {
describe('filtering', () => {
const caseTitle = 'matchme';
const caseIds: string[] = [];

Expand Down Expand Up @@ -459,8 +458,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
await testSubjects.existOrFail(`case-table-column-severity-${CaseSeverity.MEDIUM}`);
});

// FLAKY: https://github.com/elastic/kibana/issues/152928
describe.skip('assignees filtering', () => {
describe('assignees filtering', () => {
it('filters cases by the first cases all user assignee', async () => {
await cases.casesTable.filterByAssignee('all');
await cases.casesTable.validateCasesTableHasNthRows(1);
Expand Down

0 comments on commit 8ced30d

Please sign in to comment.