Skip to content

Commit

Permalink
Fix split view
Browse files Browse the repository at this point in the history
  • Loading branch information
crazyserver committed Aug 23, 2024
1 parent 6c3d62e commit 785d656
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/testing/services/behat-dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -426,15 +426,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;

splitViewContainer = (topContainer || container).querySelector<HTMLElement>(
'core-split-view ion-router-outlet',
);
return true;
}

return !!splitViewContainer;
return false;
});

return splitViewContainer ? [splitViewContainer] : [];
Expand Down

0 comments on commit 785d656

Please sign in to comment.