Skip to content

Commit

Permalink
Browser Tests: Flaky mobile menus, another attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
alecpl committed Nov 26, 2023
1 parent afdfdf6 commit 53374f6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/Browser/Components/Popupmenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ public function closeMenu($browser)
$browser->withinBody(function ($browser) {
$browser->script("window.UI.menu_hide('{$this->id}')");
$browser->waitUntilMissingOrStale($this->selector());
// FIXME: For some reason sometimes .popover-overlay does not close,
// we have to remove it manually
$browser->script(
"Array.from(document.getElementsByClassName('popover-overlay')).forEach(function(elem) { elem.parentNode.removeChild(elem); })"
);
});
}

Expand Down

0 comments on commit 53374f6

Please sign in to comment.