diff --git a/js/apps/system/_admin/aardvark/APP/frontend/js/models/foxx.js b/js/apps/system/_admin/aardvark/APP/frontend/js/models/foxx.js index b19d1399ca..f1b7690b26 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/js/models/foxx.js +++ b/js/apps/system/_admin/aardvark/APP/frontend/js/models/foxx.js @@ -89,6 +89,10 @@ }); }, + isSystem: function() { + return this.get("system"); + }, + isDevelopment: function() { return this.get("development"); } diff --git a/js/apps/system/_admin/aardvark/APP/frontend/js/templates/applicationDetailView.ejs b/js/apps/system/_admin/aardvark/APP/frontend/js/templates/applicationDetailView.ejs index 14b044507f..6fafeda702 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/js/templates/applicationDetailView.ejs +++ b/js/apps/system/_admin/aardvark/APP/frontend/js/templates/applicationDetailView.ejs @@ -29,7 +29,7 @@
- + />

diff --git a/js/apps/system/_admin/aardvark/APP/frontend/js/views/applicationDetailView.js b/js/apps/system/_admin/aardvark/APP/frontend/js/views/applicationDetailView.js index e2ef1dc219..9c7d3078d9 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/js/views/applicationDetailView.js +++ b/js/apps/system/_admin/aardvark/APP/frontend/js/views/applicationDetailView.js @@ -114,7 +114,7 @@ }, showConfigureDialog: function(e) { - if ((this._appConfig).keys.length === 0) { + if (Object.keys(this._appConfig).length === 0) { e.stopPropagation(); return; } diff --git a/js/apps/system/_admin/aardvark/APP/test/specs/models/foxxSpec.js b/js/apps/system/_admin/aardvark/APP/test/specs/models/foxxSpec.js index 0e135cab2a..a53fd8c408 100644 --- a/js/apps/system/_admin/aardvark/APP/test/specs/models/foxxSpec.js +++ b/js/apps/system/_admin/aardvark/APP/test/specs/models/foxxSpec.js @@ -35,7 +35,20 @@ var myFoxx = new window.Foxx(); expect(myFoxx.isNew()).toBeFalsy(); }); + + it("system apps should know it", function() { + var myFoxx = new window.Foxx({ + system: true + }); + expect(myFoxx.isSystem()).toBeTruthy(); + }); + it("non system apps should know it", function() { + var myFoxx = new window.Foxx({ + system: false + }); + expect(myFoxx.isSystem()).toBeFalsy(); + }); describe("mode chages", function() { diff --git a/js/apps/system/_admin/aardvark/APP/test/specs/views/applicationDetailViewSpec.js b/js/apps/system/_admin/aardvark/APP/test/specs/views/applicationDetailViewSpec.js index d522aad719..e5ea4c8860 100644 --- a/js/apps/system/_admin/aardvark/APP/test/specs/views/applicationDetailViewSpec.js +++ b/js/apps/system/_admin/aardvark/APP/test/specs/views/applicationDetailViewSpec.js @@ -65,6 +65,7 @@ }); it("should be able to delete the app", function() { + runs(function() { deleteButton.click(); }); @@ -153,7 +154,7 @@ }); it("the button should be enabled", function() { - expect($(buttonId).prop("disabled")).toEqual(false); + expect($(buttonId).hasClass("disabled")).toEqual(false); }); it("should utilize a modal dialog", function() { @@ -205,7 +206,7 @@ }); it("the button should be disabled", function() { - expect($(buttonId).prop("disabled")).toEqual(true); + expect($(buttonId).hasClass("disabled")).toEqual(true); }); });