Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1332,12 +1332,14 @@ describe('Collection aggregations tab', function () {
});
await browser.waitForAriaDisabled(previousButton, true);

// previousButton has a tooltip, to close it we press Escape
// and wait a bit (for the debounced close to kick in)
await browser.keys([Key.Escape]);
await sleep(50);
// previousButton has a tooltip and as it becomes disabled,
// tooltip disappers. wait for it to disappear
await browser.waitForAnimations(Selectors.FocusModeModal);

// the next Escape is for the modal to close
// As the tooltip disappeared at this point, the previousButton still
// has the focus. Pressing escape twice, should close the modal.
await browser.keys([Key.Escape]);
await sleep(100);
await browser.keys([Key.Escape]);
Copy link
Collaborator

@gribnoysup gribnoysup Jan 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe there is a way for us to do it without an arbitrary timeout, like removing the focus from the button? Also just generally wondering why button is swallowing the Esc keypress in this case, is this a bug? Nevermind this part, I tried it out and can see how this happens, just wasn't clear for me from the comment in the code: tooltip shows and this first esc press closes the tooltip.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, i can try to remove the focus from it. I think it has to do with tooltip. I tried to re-create this here, with two different versions - one with tooltip and one without tooltip and the one with tooltip has this issue.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think without complicating it even more, i'd do as we do at other places, close the modal using its close button.


await modal.waitForDisplayed({ reverse: true });
Expand Down
Loading