Skip to content

Commit

Permalink
fix the tests...
Browse files Browse the repository at this point in the history
  • Loading branch information
epugh committed Sep 12, 2023
1 parent 0cde137 commit 3a7ba5a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 0 additions & 3 deletions app/assets/templates/views/wizardModal.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ <h2>What Search Endpoint do you want to connect to?</h2>
<img ng-src="images/snapshot.png" alt='Snapshot' width="150px" height="50px" />
</label>
</div>




<br>
<p ng-if="!pendingWizardSettings.searchEngine === 'snapshot'">
Expand Down
7 changes: 6 additions & 1 deletion spec/javascripts/angular/controllers/queryParams_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {};
Expand Down Expand Up @@ -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();
Expand Down
1 change: 1 addition & 0 deletions spec/javascripts/angular/controllers/wizardModal_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 3a7ba5a

Please sign in to comment.