Merge pull request #3374 from crazyserver/MOBILE-4081

MOBILE-4081 behat: Fix swipe out of zone
main
Dani Palou 2022-09-05 07:53:24 +02:00 committed by GitHub
commit ed8f298612
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 24 additions and 24 deletions

View File

@ -224,7 +224,7 @@ class behat_app extends behat_app_helper {
public function i_swipe_in_the_app(string $direction) {
$method = 'swipe' . ucwords($direction);
$this->runtime_js("getAngularInstance('ion-content', 'CoreSwipeNavigationDirective').$method()");
$this->zone_js("getAngularInstance('ion-content', 'CoreSwipeNavigationDirective').$method()");
$this->wait_for_pending_js();

View File

@ -259,4 +259,4 @@ export enum AddonModAssignListFilterName {
NEED_GRADING = 'needgrading',
DRAFT = 'draft',
SUBMITTED = 'submitted',
};
}

View File

@ -1825,7 +1825,7 @@ export enum AddonModAssignSubmissionStatusValues {
NO_ONLINE_SUBMISSIONS = 'noonlinesubmissions',
NO_SUBMISSION = 'nosubmission',
GRADED_FOLLOWUP_SUBMIT = 'gradedfollowupsubmit',
};
}
/**
* Grading status.
@ -1837,7 +1837,7 @@ export enum AddonModAssignGradingStates {
// Added by App Statuses.
MARKING_WORKFLOW_STATE_RELEASED = 'released', // with ASSIGN_MARKING_WORKFLOW_STATE_RELEASED
GRADED_FOLLOWUP_SUBMIT = 'gradedfollowupsubmit',
};
}
/**
* Reopen attempt methods.
@ -1847,4 +1847,4 @@ export enum AddonModAssignAttemptReopenMethodValues {
NONE = 'none',
MANUAL = 'manual',
UNTILPASS = 'untilpass',
};
}

View File

@ -856,4 +856,4 @@ export class AddonQtypeDdImageOrTextQuestionDocStructure {
return divDrag;
}
};
}

View File

@ -44,7 +44,7 @@ export interface TransitionOptions extends NavOptions {
baseEl: HTMLElement;
enteringEl: HTMLElement;
leavingEl: HTMLElement | undefined;
};
}
export const shadow = <T extends Element>(el: T): ShadowRoot | T => el.shadowRoot || el;

View File

@ -2410,7 +2410,7 @@ export enum CoreSiteInfoUserHomepage {
HOMEPAGE_SITE = 0, // Site home.
HOMEPAGE_MY = 1, // Dashboard.
HOMEPAGE_MYCOURSES = 3, // My courses.
};
}
/**
* Result of WS tool_mobile_get_config.

View File

@ -56,7 +56,7 @@ export class CoreMessageComponent implements OnInit {
@HostBinding('class.no-user') get showUser(): boolean {
return !this.message?.showUserData;
};
}
get userId(): number | undefined {
return this.user && (this.user.userid || this.user.id);

View File

@ -36,7 +36,7 @@ export const enum ModPurpose {
MOD_PURPOSE_ADMINISTRATION = 'administration',
MOD_PURPOSE_INTERFACE = 'interface',
MOD_PURPOSE_OTHER = 'other',
};
}
/**
* Static class to contain all the core constants.
@ -168,4 +168,4 @@ interface EnvironmentBuild {
isDevelopment: boolean;
lastCommitHash: string;
compilationTime: number;
};
}

View File

@ -194,7 +194,7 @@ export class CoreCoursesCourseLinkHandlerService extends CoreContentLinksHandler
CoreSites.getCurrentSite()?.openInBrowserWithAutoLogin(url, undefined, { showBrowserWarning: false });
} catch {
// User cancelled.
};
}
throw new CoreError(notEnrolledMessage);
}

View File

@ -185,4 +185,4 @@ interface GeolocationPositionError {
PERMISSION_DENIED: number; // eslint-disable-line @typescript-eslint/naming-convention
POSITION_UNAVAILABLE: number; // eslint-disable-line @typescript-eslint/naming-convention
TIMEOUT: number; // eslint-disable-line @typescript-eslint/naming-convention
};
}

View File

@ -27,7 +27,7 @@ export enum CoreNetworkConnection {
CELL_4G = '4g',
CELL = 'cellular',
NONE = 'none',
};
}
/**
* Service to manage network connections.

View File

@ -35,7 +35,7 @@ export enum CoreIonicColorNames {
MEDIUM = 'medium',
LIGHT = 'light',
NONE = '',
};
}
/**
* Singleton with helper functions for colors.

View File

@ -444,4 +444,4 @@ export class Locutus {
return substr_replace(str, replace, start, length);
}
};
}

View File

@ -71,7 +71,7 @@ export class TestingBehatDomUtilsService {
}
return this.isElementSelected(parentElement, container);
};
}
/**
* Finds elements within a given container with exact info.
@ -180,7 +180,7 @@ export class TestingBehatDomUtilsService {
}
return elements;
};
}
/**
* Checks an element has exactly the same label (title, alt or aria-label).
@ -215,7 +215,7 @@ export class TestingBehatDomUtilsService {
elements.sort((a, b) => Number(b.exact) - Number(a.exact));
return elements.map(element => element.element);
};
}
/**
* Given a list of elements, get the top ancestors among all of them.
@ -273,7 +273,7 @@ export class TestingBehatDomUtilsService {
}
return this.getClosestMatching(element.parentElement, selector, container);
};
}
/**
* Function to find top container elements.
@ -339,7 +339,7 @@ export class TestingBehatDomUtilsService {
});
return topContainers;
};
}
/**
* Function to find element based on their text or Aria label.
@ -463,7 +463,7 @@ export class TestingBehatDomUtilsService {
} while (container !== topContainer && (container = this.getParentElement(container)) && container !== topContainer);
return [];
};
}
/**
* Make sure that an element is visible and wait to trigger the callback.
@ -492,7 +492,7 @@ export class TestingBehatDomUtilsService {
});
return promise;
};
}
/**
* Press an element.

View File

@ -31,7 +31,7 @@ abstract class WrapperComponent<U> {
child!: U;
};
}
type ServiceInjectionToken = AbstractType<unknown> | Type<unknown> | string;