mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
This commit is contained in:
parent
4c484728ee
commit
edf0021c1c
1 changed files with 11 additions and 2 deletions
|
@ -131,9 +131,18 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont
|
|||
const operationSelector = opts.isPreviousIncompatible
|
||||
? `lns-indexPatternDimension-${opts.operation} incompatible`
|
||||
: `lns-indexPatternDimension-${opts.operation}`;
|
||||
await retry.try(async () => {
|
||||
await testSubjects.exists(operationSelector);
|
||||
async function getAriaPressed() {
|
||||
const operationSelectorContainer = await testSubjects.find(operationSelector);
|
||||
await testSubjects.click(operationSelector, undefined, FORMULA_TAB_HEIGHT);
|
||||
const ariaPressed = await operationSelectorContainer.getAttribute('aria-pressed');
|
||||
return ariaPressed;
|
||||
}
|
||||
|
||||
// adding retry here as it seems that there is a flakiness of the operation click
|
||||
// it seems that the aria-pressed attribute is updated to true when the button is clicked
|
||||
await retry.waitFor('aria pressed to be true', async () => {
|
||||
const ariaPressedStatus = await getAriaPressed();
|
||||
return ariaPressedStatus === 'true';
|
||||
});
|
||||
}
|
||||
if (opts.field) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue