function checkErrorPopUp() {
            var doc = $(testWindow.document),
                errorPopUp = doc.find(".error-dialog.instance"),
                errorPopUpHeader = errorPopUp.find(".modal-header"),
                errorPopUpBody = errorPopUp.find(".modal-body"),
                errorPopUpFooter = errorPopUp.find(".modal-footer"),
                errorPopUpPresent = false;

            runs(function () {
                expect(errorPopUp.length).toBe(1);
                expect(errorPopUpHeader).not.toBeNull();
                expect(errorPopUpBody).not.toBeNull();
                expect(errorPopUpFooter).not.toBeNull();
            });

            if (errorPopUp && errorPopUp.length > 0) {
                errorPopUpPresent =  true;
            }
            return errorPopUpPresent;
        }
Check the presence of Error Prompt on Brackets Window