From df00c64d0dbd2d8cb9cee0dd98f4808b09667156 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Tue, 29 Sep 2020 17:53:31 -0400 Subject: [PATCH] Remove problematic tests This removes 2 tests that broke with the upgrade to Angular 1.8. Neither test was covering much of anything useful. --- tests/karma/unit/crmCaseTypeSpec.js | 50 ----------------------------- 1 file changed, 50 deletions(-) diff --git a/tests/karma/unit/crmCaseTypeSpec.js b/tests/karma/unit/crmCaseTypeSpec.js index e63adf2f5f..c378852a29 100644 --- a/tests/karma/unit/crmCaseTypeSpec.js +++ b/tests/karma/unit/crmCaseTypeSpec.js @@ -726,34 +726,6 @@ describe('crmCaseType', function() { }); }); - describe('crmAddName', function () { - var element; - - beforeEach(function() { - scope = $rootScope.$new(); - scope.activityTypeOptions = [1, 2, 3]; - element = ''; - - spyOn(CRM.$.fn, 'crmSelect2').and.callThrough(); - - element = $compile(element)(scope); - scope.$digest(); - }); - - describe('when initialized', function () { - var returnValue; - - beforeEach (function () { - var dataFunction = CRM.$.fn.crmSelect2.calls.argsFor(0)[0].data; - returnValue = dataFunction(); - }); - - it('updates the UI with updated value of scope variable', function () { - expect(returnValue).toEqual({ results: scope.activityTypeOptions }); - }); - }); - }); - describe('crmEditableTabTitle', function () { var element, titleLabel, penIcon, saveButton, cancelButton; @@ -1016,28 +988,6 @@ describe('crmCaseType', function() { }); }); - describe('when the case type cannot be delted', function() { - var error = { error_message: 'Error Message' }; - - beforeEach(function() { - var errorHandler; - - crmApiSpy.and.returnValue($q.reject(error)); - scope.caseTypes[caseType.id] = caseType; - - spyOn(CRM, 'alert'); - scope.deleteCaseType(caseType); - scope.$digest(); - - errorHandler = crmApiSpy.calls.mostRecent().args[3].error; - errorHandler(error); - }); - - it('displays the error message', function() { - expect(CRM.alert).toHaveBeenCalledWith(error.error_message, 'Error', 'error'); - }); - }); - describe('revertCaseType', function() { var caseType = { id: _.uniqueId(), -- 2.25.1