Skip to content

Commit

Permalink
Make sort integration test resilient to network delays. (elastic#196516)
Browse files Browse the repository at this point in the history
Fixes elastic#182017

## Summary

The PR tries to address the flakiness from the test.

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
awahab07 and elasticmachine authored Oct 22, 2024
1 parent c076b7a commit cbf7982
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,25 +214,25 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

it('should sort the integrations list by the clicked sorting option', async () => {
// Test ascending order
await PageObjects.observabilityLogsExplorer.clickSortButtonBy('asc');

await retry.try(async () => {
await PageObjects.observabilityLogsExplorer.clickSortButtonBy('desc');
await PageObjects.observabilityLogsExplorer.clickSortButtonBy('asc');
const { integrations } = await PageObjects.observabilityLogsExplorer.getIntegrations();
expect(integrations).to.eql(initialPackagesTexts);
});

// Test descending order
await PageObjects.observabilityLogsExplorer.clickSortButtonBy('desc');

await retry.try(async () => {
await PageObjects.observabilityLogsExplorer.clickSortButtonBy('asc');
await PageObjects.observabilityLogsExplorer.clickSortButtonBy('desc');
const { integrations } = await PageObjects.observabilityLogsExplorer.getIntegrations();
expect(integrations).to.eql(initialPackagesTexts.slice().reverse());
});

// Test back ascending order
await PageObjects.observabilityLogsExplorer.clickSortButtonBy('asc');

await retry.try(async () => {
await PageObjects.observabilityLogsExplorer.clickSortButtonBy('desc');
await PageObjects.observabilityLogsExplorer.clickSortButtonBy('asc');
const { integrations } = await PageObjects.observabilityLogsExplorer.getIntegrations();
expect(integrations).to.eql(initialPackagesTexts);
});
Expand Down

0 comments on commit cbf7982

Please sign in to comment.