MOBILE-4616 behat: Fix split view selectors on behat
parent
b2691e8b3c
commit
038dfd1e59
|
@ -46,6 +46,7 @@ export class TestingBehatDomUtilsService {
|
|||
isElementVisible(element: HTMLElement, container?: HTMLElement): boolean {
|
||||
if (element.getAttribute('aria-hidden') === 'true') {
|
||||
if (
|
||||
element.tagName === 'ION-ROUTER-OUTLET' &&
|
||||
element === document.body.querySelector('ion-app > ion-router-outlet') &&
|
||||
(document.body.querySelector('ion-toast.hydrated:not(.overlay-hidden)') ||
|
||||
!document.body.querySelector(
|
||||
|
@ -430,15 +431,13 @@ export class TestingBehatDomUtilsService {
|
|||
if (!container.classList.contains('ion-page')) {
|
||||
return false;
|
||||
}
|
||||
if (container.closest('ion-router-outlet.content-outlet')) {
|
||||
splitViewContainer = container;
|
||||
|
||||
const pageContainers = Array.from(container.querySelectorAll<HTMLElement>('.ion-page:not(.ion-page-hidden)'));
|
||||
const topContainer = pageContainers.find((page) => !page.closest('.ion-page.ion-page-hidden')) ?? null;
|
||||
return true;
|
||||
}
|
||||
|
||||
splitViewContainer = (topContainer || container).querySelector<HTMLElement>(
|
||||
'core-split-view ion-router-outlet',
|
||||
);
|
||||
|
||||
return !!splitViewContainer;
|
||||
return false;
|
||||
});
|
||||
|
||||
return splitViewContainer ? [splitViewContainer] : [];
|
||||
|
|
Loading…
Reference in New Issue