Skip to content

Commit

Permalink
Improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
cnasikas committed Apr 7, 2022
1 parent 0b11262 commit b366116
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
15 changes: 15 additions & 0 deletions x-pack/test/functional/services/cases/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@ export function CasesTableServiceProvider({ getService, getPageObject }: FtrProv
await testSubjects.existOrFail('case-view-title', {
timeout: config.get('timeouts.waitFor'),
});
await testSubjects.existOrFail('euiToastHeader', {
timeout: config.get('timeouts.waitFor'),
});
},

async deleteFirstListedCase() {
await testSubjects.existOrFail('action-delete', {
timeout: config.get('timeouts.waitFor'),
});
await testSubjects.click('action-delete');
await testSubjects.existOrFail('confirmModalConfirmButton', {
timeout: config.get('timeouts.waitFor'),
});
await testSubjects.click('confirmModalConfirmButton');
},

async bulkDeleteAllCases() {
Expand Down Expand Up @@ -72,6 +86,7 @@ export function CasesTableServiceProvider({ getService, getPageObject }: FtrProv
this.refreshTable();
return await testSubjects.exists('case-details-link');
});
await header.waitUntilLoadingHasFinished();
},

async waitForCasesToBeDeleted() {
Expand Down
4 changes: 1 addition & 3 deletions x-pack/test/functional_with_es_ssl/apps/cases/list_view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
});

it('deletes a case correctly from the list', async () => {
await testSubjects.click('action-delete');
await testSubjects.click('confirmModalConfirmButton');
await testSubjects.existOrFail('euiToastHeader');
cases.casesTable.deleteFirstListedCase();
await cases.casesTable.waitForTableToFinishLoading();

await retry.tryForTime(2000, async () => {
Expand Down

0 comments on commit b366116

Please sign in to comment.