Skip to content

Commit

Permalink
[8.x] Make sort integration test resilient to network delays. (elasti…
Browse files Browse the repository at this point in the history
…c#196516) (elastic#197237)

# Backport

This will backport the following commits from `main` to `8.x`:
- [Make sort integration test resilient to network delays.
(elastic#196516)](elastic#196516)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Abdul Wahab
Zahid","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-22T13:11:08Z","message":"Make
sort integration test resilient to network delays. (elastic#196516)\n\nFixes
https://github.com/elastic/kibana/issues/182017\r\n\r\n##
Summary\r\n\r\nThe PR tries to address the flakiness from the
test.\r\n\r\nCo-authored-by: Elastic Machine
<[email protected]>","sha":"cbf7982887decc527455dd8f64477813e8ea2672","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","v9.0.0","backport:prev-minor","Team:obs-ux-logs"],"title":"Make
sort integration test resilient to network
delays.","number":196516,"url":"https://github.com/elastic/kibana/pull/196516","mergeCommit":{"message":"Make
sort integration test resilient to network delays. (elastic#196516)\n\nFixes
https://github.com/elastic/kibana/issues/182017\r\n\r\n##
Summary\r\n\r\nThe PR tries to address the flakiness from the
test.\r\n\r\nCo-authored-by: Elastic Machine
<[email protected]>","sha":"cbf7982887decc527455dd8f64477813e8ea2672"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196516","number":196516,"mergeCommit":{"message":"Make
sort integration test resilient to network delays. (elastic#196516)\n\nFixes
https://github.com/elastic/kibana/issues/182017\r\n\r\n##
Summary\r\n\r\nThe PR tries to address the flakiness from the
test.\r\n\r\nCo-authored-by: Elastic Machine
<[email protected]>","sha":"cbf7982887decc527455dd8f64477813e8ea2672"}}]}]
BACKPORT-->

Co-authored-by: Abdul Wahab Zahid <[email protected]>
  • Loading branch information
kibanamachine and awahab07 authored Oct 22, 2024
1 parent d6df65e commit 6c8699f
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 6c8699f

Please sign in to comment.