mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
chore(): sync with main
This commit is contained in:
@@ -15,7 +15,8 @@ export const startTapClick = (config: Config) => {
|
||||
const clearDefers = new WeakMap<HTMLElement, any>();
|
||||
|
||||
const isScrolling = () => {
|
||||
return scrollingEl?.parentElement !== null;
|
||||
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
||||
return scrollingEl !== undefined && scrollingEl.parentElement !== null;
|
||||
};
|
||||
|
||||
// Touch Events
|
||||
@@ -169,7 +170,7 @@ const getActivatableTarget = (ev: any): any => {
|
||||
const path = ev.composedPath() as HTMLElement[];
|
||||
for (let i = 0; i < path.length - 2; i++) {
|
||||
const el = path[i];
|
||||
if (el?.classList.contains('ion-activatable')) {
|
||||
if (!(el instanceof ShadowRoot) && el.classList.contains('ion-activatable')) {
|
||||
return el;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ export const test = base.extend<CustomFixtures>({
|
||||
* to be hydrated before proceeding with the test.
|
||||
*/
|
||||
page.goto = async (url: string) => {
|
||||
const { mode, rtl } = testInfo.project.metadata;
|
||||
const { mode, rtl, _testing } = testInfo.project.metadata;
|
||||
|
||||
const splitUrl = url.split('?');
|
||||
const paramsString = splitUrl[1];
|
||||
@@ -55,8 +55,9 @@ export const test = base.extend<CustomFixtures>({
|
||||
const urlToParams = new URLSearchParams(paramsString);
|
||||
const formattedMode = urlToParams.get('ionic:mode') ?? mode;
|
||||
const formattedRtl = urlToParams.get('rtl') ?? rtl;
|
||||
const ionicTesting = urlToParams.get('ionic:_testing') ?? _testing;
|
||||
|
||||
const formattedUrl = `${splitUrl[0]}?ionic:_testing=true&ionic:mode=${formattedMode}&rtl=${formattedRtl}`;
|
||||
const formattedUrl = `${splitUrl[0]}?ionic:_testing=${ionicTesting}&ionic:mode=${formattedMode}&rtl=${formattedRtl}`;
|
||||
|
||||
const results = await Promise.all([
|
||||
page.waitForFunction(() => (window as any).testAppLoaded === true),
|
||||
|
||||
Reference in New Issue
Block a user