Skip to content

Commit

Permalink
Make sort integration test resilient to network delays.
Browse files Browse the repository at this point in the history
  • Loading branch information
awahab07 committed Oct 16, 2024
1 parent 4339f84 commit 3a4c96b
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 3a4c96b

Please sign in to comment.