From 3a7ba5a1daddf4c81611b81024f1bd89e4a0e84e Mon Sep 17 00:00:00 2001 From: Eric Pugh Date: Tue, 12 Sep 2023 11:39:46 -0400 Subject: [PATCH] fix the tests... --- app/assets/templates/views/wizardModal.html | 3 --- spec/javascripts/angular/controllers/queryParams_spec.js | 7 ++++++- spec/javascripts/angular/controllers/wizardModal_spec.js | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/assets/templates/views/wizardModal.html b/app/assets/templates/views/wizardModal.html index 5a105777b..6348a647f 100644 --- a/app/assets/templates/views/wizardModal.html +++ b/app/assets/templates/views/wizardModal.html @@ -70,9 +70,6 @@

What Search Endpoint do you want to connect to?

Snapshot - - -

diff --git a/spec/javascripts/angular/controllers/queryParams_spec.js b/spec/javascripts/angular/controllers/queryParams_spec.js index 1dea9f791..407d56133 100644 --- a/spec/javascripts/angular/controllers/queryParams_spec.js +++ b/spec/javascripts/angular/controllers/queryParams_spec.js @@ -8,11 +8,15 @@ describe('Controller: QueryparamsCtrl', function () { var QueryparamsCtrl, scope, testTry; + + var $httpBackend; // Initialize the controller and a mock scope - beforeEach(inject(function ($controller, $rootScope, settingsSvc, TryFactory) { + beforeEach(inject(function ($injector, $controller, $rootScope, TryFactory) { scope = $rootScope.$new(); + + $httpBackend = $injector.get('$httpBackend'); var queryParams = 'q=#$query##'; var curatorVars = {}; @@ -56,6 +60,7 @@ describe('Controller: QueryparamsCtrl', function () { }); it('initializes initially undisplayed vars to the right value', function() { + $httpBackend.expectGET('api/search_endpoints?shallow=true').respond(200, {}); scope.settings.selectedTry.queryParams = 'q=#$query'; scope.settings.selectedTry.curatorVars = [{name: 'testvar', value: 1337}]; scope.qp.toggleTab(); diff --git a/spec/javascripts/angular/controllers/wizardModal_spec.js b/spec/javascripts/angular/controllers/wizardModal_spec.js index 7b10b8fc3..a70727ef4 100644 --- a/spec/javascripts/angular/controllers/wizardModal_spec.js +++ b/spec/javascripts/angular/controllers/wizardModal_spec.js @@ -88,6 +88,7 @@ describe('Controller: WizardModalCtrl', function () { describe('query adding', function() { beforeEach(function() { var settingsBootstrapped = 0; + $httpBackend.expectGET('api/search_endpoints?shallow=true').respond(200, {}); $httpBackend.expectGET('api/cases/0/tries').respond(200, bootstrappedSettingsData); settingsSvc.bootstrap() .then(function() {