Merge branch 'devel' into 3201-labels-pagination

This commit is contained in:
Michael Abashian
2017-06-27 11:59:12 -04:00
committed by GitHub
97 changed files with 1469 additions and 924 deletions

View File

@@ -6,7 +6,6 @@ describe('Controller: TemplatesList', () => {
rootScope,
state,
TemplatesListController,
ClearScope,
GetChoices,
Alert,
Prompt,
@@ -53,7 +52,6 @@ describe('Controller: TemplatesList', () => {
}
};
ClearScope = jasmine.createSpy('ClearScope');
GetChoices = jasmine.createSpy('GetChoices');
Alert = jasmine.createSpy('Alert');
Prompt = jasmine.createSpy('Prompt').and.callFake(function(args) {
@@ -61,7 +59,6 @@ describe('Controller: TemplatesList', () => {
});
InitiatePlaybookRun = jasmine.createSpy('InitiatePlaybookRun');
$provide.value('ClearScope', ClearScope);
$provide.value('GetChoices', GetChoices);
$provide.value('Alert', Alert);
$provide.value('Prompt', Prompt);
@@ -69,12 +66,11 @@ describe('Controller: TemplatesList', () => {
$provide.value('InitiatePlaybookRun', InitiatePlaybookRun);
}));
beforeEach(angular.mock.inject( ($rootScope, $controller, $q, _state_, _ConfigService_, _ClearScope_, _GetChoices_, _Alert_, _Prompt_, _InitiatePlaybookRun_) => {
beforeEach(angular.mock.inject( ($rootScope, $controller, $q, _state_, _ConfigService_, _GetChoices_, _Alert_, _Prompt_, _InitiatePlaybookRun_) => {
scope = $rootScope.$new();
rootScope = $rootScope;
q = $q;
state = _state_;
ClearScope = _ClearScope_;
GetChoices = _GetChoices_;
Alert = _Alert_;
Prompt = _Prompt_;
@@ -92,7 +88,6 @@ describe('Controller: TemplatesList', () => {
$scope: scope,
$rootScope: rootScope,
$state: state,
ClearScope: ClearScope,
GetChoices: GetChoices,
Alert: Alert,
Prompt: Prompt,

View File

@@ -5,7 +5,6 @@ describe('Controller: WorkflowAdd', () => {
let scope,
state,
WorkflowAdd,
ClearScope,
Alert,
GenerateForm,
TemplatesService,
@@ -49,8 +48,7 @@ describe('Controller: WorkflowAdd', () => {
name: "foo",
id: "1"
}];
ClearScope = jasmine.createSpy('ClearScope');
Alert = jasmine.createSpy('Alert');
ProcessErrors = jasmine.createSpy('ProcessErrors');
CreateSelect2 = jasmine.createSpy('CreateSelect2');
@@ -58,7 +56,6 @@ describe('Controller: WorkflowAdd', () => {
ParseTypeChange = jasmine.createSpy('ParseTypeChange');
ToJSON = jasmine.createSpy('ToJSON');
$provide.value('ClearScope', ClearScope);
$provide.value('Alert', Alert);
$provide.value('GenerateForm', GenerateForm);
$provide.value('state', state);
@@ -70,11 +67,10 @@ describe('Controller: WorkflowAdd', () => {
$provide.value('availableLabels', availableLabels);
}));
beforeEach(angular.mock.inject( ($rootScope, $controller, $q, $httpBackend, _state_, _ConfigService_, _ClearScope_, _GetChoices_, _Alert_, _GenerateForm_, _ProcessErrors_, _CreateSelect2_, _Wait_, _ParseTypeChange_, _ToJSON_, _availableLabels_) => {
beforeEach(angular.mock.inject( ($rootScope, $controller, $q, $httpBackend, _state_, _ConfigService_, _GetChoices_, _Alert_, _GenerateForm_, _ProcessErrors_, _CreateSelect2_, _Wait_, _ParseTypeChange_, _ToJSON_, _availableLabels_) => {
scope = $rootScope.$new();
state = _state_;
q = $q;
ClearScope = _ClearScope_;
Alert = _Alert_;
GenerateForm = _GenerateForm_;
httpBackend = $httpBackend;
@@ -99,7 +95,6 @@ describe('Controller: WorkflowAdd', () => {
WorkflowAdd = $controller('WorkflowAdd', {
$scope: scope,
$state: state,
ClearScope: ClearScope,
Alert: Alert,
GenerateForm: GenerateForm,
TemplatesService: TemplatesService,
@@ -112,10 +107,6 @@ describe('Controller: WorkflowAdd', () => {
});
}));
it('should call ClearScope', ()=>{
expect(ClearScope).toHaveBeenCalled();
});
it('should get/set the label options and select2-ify the input', ()=>{
// We expect the digest cycle to fire off this call to /static/config.js so we go ahead and handle it
httpBackend.expectGET('/static/config.js').respond(200);