I have a medium sized Angular application and for some reasons some of my protractor tests are timing out when run against my live production environment.
I am fairly sur
berkov,
I really need your help to get task list using the functionality provided by you.
I added import 'zone.js/dist/task-tracking'
; to polyfills.ts
and below code to constructor method of AppModule.ts. but it is throwing error Cannot find name 'moduleInstance'.
// app.module.ts
const ngZone = moduleInstance.injector.get(NgZone);
setInterval(() => {
var taskTrackingZone = (ngZone)._inner.getZoneWith("TaskTrackingZone");
if (!taskTrackingZone) {
throw new Error("'TaskTrackingZone' zone not found! Have you loaded 'node_modules/zone.js/dist/task-tracking.js'?");
}
var tasks: any[] = taskTrackingZone._properties.TaskTrackingZone.getTasksFor("macroTask");
tasks = _.clone(tasks);
if (_.size(tasks) > 0) {
console.log("ZONE pending tasks=", tasks);
}
}, 1000);
If it is possible, can you please provide any working example. That will be your great help.
Thank you,
Jignesh Raval
CC: @hodossy-szabolcs