Skip to content

Commit f782092

Browse files
adcoelhoCAWilson94
authored andcommitted
[ResponseOps][MW] Fix flaky maintenance window pagination test (elastic#234532)
Closes elastic#205269 ## Summary I removed some unnecessary logic and wrapped the failing portion in a retry.
1 parent 534c23d commit f782092

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

x-pack/platform/test/functional_with_es_ssl/apps/triggers_actions_ui/maintenance_windows/maintenance_windows_table.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,6 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
277277
await pageObjects.maintenanceWindows.searchMaintenanceWindows('pagination');
278278
await pageObjects.maintenanceWindows.getMaintenanceWindowsList();
279279

280-
await testSubjects.click('tablePaginationPopoverButton');
281-
await testSubjects.click('tablePagination-25-rows');
282-
await testSubjects.missingOrFail('pagination-button-1');
283280
await testSubjects.click('tablePaginationPopoverButton');
284281
await testSubjects.click('tablePagination-10-rows');
285282
const listedOnFirstPageMWs = await testSubjects.findAll('list-item');
@@ -288,8 +285,11 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
288285
await testSubjects.isEnabled('pagination-button-1');
289286
await testSubjects.click('pagination-button-1');
290287
await testSubjects.isEnabled('pagination-button-0');
291-
const listedOnSecondPageMWs = await testSubjects.findAll('list-item');
292-
expect(listedOnSecondPageMWs.length).to.be(2);
288+
289+
await retry.try(async () => {
290+
const listedOnSecondPageMWs = await testSubjects.findAll('list-item');
291+
expect(listedOnSecondPageMWs.length).to.be(2);
292+
});
293293
});
294294

295295
it('should delete a maintenance window', async () => {

0 commit comments

Comments
 (0)