diff --git a/.gitignore b/.gitignore index dba3dc3..c8e4cde 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ functions/.secret.local # firebase *-debug.log emulator_data/ +firestore_export* diff --git a/Gruntfile.js b/Gruntfile.js index f09fd09..326b56b 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -133,8 +133,7 @@ module.exports = function (grunt) { 'src/app/packages.js', 'src/app/tests/jasmineAMDErrorChecking.js' ], - host: 'http://localhost:8000', - version: '2.5.1' + host: 'http://localhost:8000' } } }, diff --git a/_SpecRunner.html b/_SpecRunner.html index bb57f83..005f611 100644 --- a/_SpecRunner.html +++ b/_SpecRunner.html @@ -16,7 +16,9 @@ - + + + @@ -40,8 +42,6 @@ - - diff --git a/_src/app/config.js b/_src/app/config.js index 827137d..7afc0f7 100644 --- a/_src/app/config.js +++ b/_src/app/config.js @@ -23,7 +23,9 @@ define([ let databaseName = 'Electrofishing'; let dataEntryApp = 'https://electrofishing.ugrc.utah.gov'; let baseUrl; - const projectId = JSON.parse(process.env.FIREBASE_CONFIG).projectId; + + const projectId = window.dojoConfig.isJasmineTestRunner ? 'test' : + JSON.parse(process.env.FIREBASE_CONFIG).projectId; if (has('agrc-build') === 'prod') { // *.ugrc.utah.gov quadWord = 'dinner-oregano-india-bahama'; diff --git a/_src/app/run.js b/_src/app/run.js index 7b68474..7aaa5e0 100644 --- a/_src/app/run.js +++ b/_src/app/run.js @@ -15,8 +15,10 @@ return window.Worker; }); - window.firebase.initializeApp(JSON.parse(process.env.FIREBASE_CONFIG)); - console.log('firebase app initialized'); + if (!window.dojoConfig.isJasmineTestRunner) { + window.firebase.initializeApp(JSON.parse(process.env.FIREBASE_CONFIG)); + console.log('firebase app initialized'); + } parser.parse(); }); diff --git a/_src/app/tests/spec/SpecApp.js b/_src/app/tests/spec/SpecApp.js deleted file mode 100644 index 855d662..0000000 --- a/_src/app/tests/spec/SpecApp.js +++ /dev/null @@ -1,28 +0,0 @@ -require([ - 'app/App', - 'dojo/dom-construct', - 'dojo/_base/window' - -], - -function ( - App, - domConstruct, - win -) { - describe('app/App', function () { - var testWidget; - beforeEach(function () { - testWidget = new App({}, domConstruct.create('div', {}, win.body())); - testWidget.startup(); - }); - afterEach(function () { - testWidget.destroy(); - testWidget = null; - }); - - it('creates a valid object', function () { - expect(testWidget).toEqual(jasmine.any(App)); - }); - }); -});