mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: working with builder xml require vs dynamic import wip
This commit is contained in:
@@ -23,6 +23,7 @@ function runTests() {
|
||||
|
||||
export function onNavigatedTo(args) {
|
||||
args.object.off(Page.loadedEvent, onNavigatedTo);
|
||||
console.log('onNavigatedTo called', executeTests);
|
||||
if (executeTests) {
|
||||
executeTests = false;
|
||||
runTests();
|
||||
|
||||
@@ -455,6 +455,7 @@ function getAllProperties(obj: any) {
|
||||
let testsSelector: string;
|
||||
export function runAll(testSelector?: string) {
|
||||
testsSelector = testSelector;
|
||||
console.log('runAll called with:', testSelector);
|
||||
if (running) {
|
||||
// TODO: We may schedule pending run requests
|
||||
return;
|
||||
|
||||
@@ -359,6 +359,7 @@ export function waitUntilReady(isReady: () => boolean, timeoutSec: number = 5, s
|
||||
const currentRunLoop = NSRunLoop.currentRunLoop;
|
||||
currentRunLoop.limitDateForMode(currentRunLoop.currentMode);
|
||||
if (isReady()) {
|
||||
console.log('waitUntilReady: isReady() returned true');
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -203,11 +203,13 @@ export function waitUntilNavigatedFrom(action: Function, topFrame?: Frame) {
|
||||
const currentPage = topFrame ? topFrame.currentPage : Frame.topmost().currentPage;
|
||||
let completed = false;
|
||||
function navigatedFrom(args) {
|
||||
console.log('navigatedFrom called');
|
||||
args.object.page.off('navigatedFrom', navigatedFrom);
|
||||
completed = true;
|
||||
}
|
||||
|
||||
currentPage.on('navigatedFrom', navigatedFrom);
|
||||
console.log('calling action!');
|
||||
action();
|
||||
TKUnit.waitUntilReady(() => completed);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user