[Lens] Fix click retry (#132605)

* fix retry

* give more time before retryin

* fix bug

* only try to click empty dimension if it did not open in the meantime

* try another thing

* try another thing

* fix
This commit is contained in:
Joe Reuter 2022-05-25 13:57:48 +02:00 committed by GitHub
parent 1d0e3e72b4
commit f1d3127011
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -125,8 +125,10 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont
layerIndex = 0
) {
await retry.try(async () => {
await testSubjects.click(`lns-layerPanel-${layerIndex} > ${opts.dimension}`);
await testSubjects.exists(`lns-indexPatternDimension-${opts.operation}`);
if (!(await testSubjects.exists('lns-indexPattern-dimensionContainerClose'))) {
await testSubjects.click(`lns-layerPanel-${layerIndex} > ${opts.dimension}`);
}
await testSubjects.existOrFail('lns-indexPattern-dimensionContainerClose');
});
if (opts.operation === 'formula') {