Skip to content

Commit

Permalink
[Lens] Stabilize FTR test (elastic#202476)
Browse files Browse the repository at this point in the history
## Summary

Fixes elastic#200120

The navigation bar is not focused for some reason. Making it wait a bit
seems to stabilize it.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit 9df7373)

# Conflicts:
#	x-pack/test/functional/apps/lens/group2/persistent_context.ts
  • Loading branch information
dej611 committed Dec 12, 2024
1 parent 8c7e4e4 commit d2780b7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions x-pack/test/functional/apps/lens/group2/persistent_context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import expect from '@kbn/expect';
import expect from '@kbn/expect/expect';
import { FtrProviderContext } from '../../../ftr_provider_context';

export default function ({ getService, getPageObjects }: FtrProviderContext) {
Expand Down Expand Up @@ -75,9 +75,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await listingTable.searchForItemWithName('lnsTableVis');
await lens.clickVisualizeListItemTitle('lnsTableVis');
await lens.goToTimeRange();
await navigationalSearch.focus();
await navigationalSearch.searchFor('type:application lens');
await navigationalSearch.clickOnOption(0);
await retry.try(async () => {
await navigationalSearch.focus();
await navigationalSearch.searchFor('type:application lens');
await navigationalSearch.clickOnOption(0);
});
await lens.waitForEmptyWorkspace();
await lens.switchToVisualization('lnsLegacyMetric');
await lens.dragFieldToWorkspace('@timestamp', 'legacyMtrVis');
Expand Down

0 comments on commit d2780b7

Please sign in to comment.