Skip to content

Instantly share code, notes, and snippets.

@sandipchitale
sandipchitale / angular-stability-check.js
Last active October 21, 2021 07:26 — forked from andreroggeri/angular-stability-check.js
Checks the Angular stability and logs on the console. Useful for debugging long protractor waits
/**
* Copy and paste the code below on your browser console
* It will log the stable changes and how long it took to become stable
*/
let currentStatus = undefined;
let root = $('ia-infoarchive-app'); // Change this selector to the component that you'll be watching (Usually the root component)
let startTime = new Date();
let stabilityChecker = setInterval(() => {
let newStatus = window.getAngularTestability(root).isStable();
if (currentStatus !== newStatus) {