diff --git a/luciexpress/htdocs/plugins/core/widgets/luci.login.js b/luciexpress/htdocs/plugins/core/widgets/luci.login.js index 84d89b5c8..c231b26b3 100644 --- a/luciexpress/htdocs/plugins/core/widgets/luci.login.js +++ b/luciexpress/htdocs/plugins/core/widgets/luci.login.js @@ -93,7 +93,7 @@ JUCI.app $rpc.$logout().done(function(){ console.log("Logged out!"); //$state.go("home", {}, {reload: true}); - $juci.redirect("overview"); //$window.location.href="/"; + JUCI.redirect("overview"); //$window.location.href="/"; deferred.resolve(); }).fail(function(){ console.error("Error logging out!"); diff --git a/luciexpress/htdocs/plugins/internet/tests/test-internet.js b/luciexpress/htdocs/plugins/internet/tests/test-internet.js index 2fcf46881..547a21381 100644 --- a/luciexpress/htdocs/plugins/internet/tests/test-internet.js +++ b/luciexpress/htdocs/plugins/internet/tests/test-internet.js @@ -19,13 +19,13 @@ describe("UCI.firewall", function(){ done(); }); }); - it("should have dmz section of type include", function(){ + it("should have dmz section of type dmz", function(){ expect($uci.firewall.dmz).to.be.ok(); - expect($uci.firewall.dmz[".type"]).to.be("include"); + expect($uci.firewall.dmz[".type"]).to.be("dmz"); }); - it("should have dmzhost section of type dmzhost", function(){ + it("should have dmzhost section of type include", function(){ expect($uci.firewall).to.have.property("dmzhost"); - expect($uci.firewall.dmzhost[".type"]).to.be("dmzhost"); + expect($uci.firewall.dmzhost[".type"]).to.be("include"); }); it("should have Allow-Ping firewall rule set to visible (hidden=0)", function(done){ var ping_rule = $uci.firewall["@rule"].filter(function(x){ return x.name.value == "Allow-Ping"; }); diff --git a/luciexpress/htdocs/plugins/settings/tests/test-settings.js b/luciexpress/htdocs/plugins/settings/tests/test-settings.js index 7b19d8790..247c0f8ce 100644 --- a/luciexpress/htdocs/plugins/settings/tests/test-settings.js +++ b/luciexpress/htdocs/plugins/settings/tests/test-settings.js @@ -3,9 +3,9 @@ require("../../../../tests/lib-juci"); var completed = { "configuration": 1, "energy": 1, - "network": 0, + "network": 1, "password": 1, - "upgrade": 0 + "upgrade": 1 } describe("Settings", function(){ diff --git a/luciexpress/htdocs/plugins/status/pages/status.status.html b/luciexpress/htdocs/plugins/status/pages/status.status.html index 5a4a74265..19d5132e0 100644 --- a/luciexpress/htdocs/plugins/status/pages/status.status.html +++ b/luciexpress/htdocs/plugins/status/pages/status.status.html @@ -20,7 +20,7 @@ - + {{dslinfo.status}} diff --git a/luciexpress/htdocs/plugins/status/tests/test-status.js b/luciexpress/htdocs/plugins/status/tests/test-status.js index 8cebaf8df..ac6855d31 100644 --- a/luciexpress/htdocs/plugins/status/tests/test-status.js +++ b/luciexpress/htdocs/plugins/status/tests/test-status.js @@ -2,9 +2,9 @@ require("../../../../tests/lib-juci"); var completed = { "about": 1, - "diagnostics": 0, - "events": 0, - "nat": 0, + //"diagnostics": 0, + "events": 1, + "nat": 1, "restart": 1, "status.dsl": 1, "status.status": 1, @@ -25,6 +25,16 @@ describe("Status", function(){ expect($rpc.router.igmptable).to.be.ok(); $rpc.router.igmptable() .done(function(){ done(); }) - .fail(function(){ throw new Error("Was unable to call router.igmptable"); }); + .fail(function(){ }); + }); + it("should have correct boardpanel.network settings", function(done){ + $rpc.network.interface.dump().done(function(results){ + expect(results.interface).to.be.ok(); + var devs = results.interface.map(function(x){ return x.interface; }); + expect(devs).to.contain($uci.boardpanel.network.internet.value); + expect(devs).to.contain($uci.boardpanel.network.voice.value); + expect(devs).to.contain($uci.boardpanel.network.iptv.value); + done(); + }); }); }); diff --git a/luciexpress/htdocs/plugins/wifi/tests/test-wireless.js b/luciexpress/htdocs/plugins/wifi/tests/test-wireless.js index 2cc488a38..ee18383c8 100644 --- a/luciexpress/htdocs/plugins/wifi/tests/test-wireless.js +++ b/luciexpress/htdocs/plugins/wifi/tests/test-wireless.js @@ -7,7 +7,7 @@ var completed = { "mac_filter": 1, "schedule": 1, "settings": 1, - "wps": 0 + "wps": 1 } describe("Wireless", function(){ diff --git a/luciexpress/share/acl.d/luci2.json b/luciexpress/share/acl.d/luci2.json index 72b8890a6..a75527a21 100644 --- a/luciexpress/share/acl.d/luci2.json +++ b/luciexpress/share/acl.d/luci2.json @@ -44,7 +44,8 @@ "router": [ "dslstats", "info", - "clients" + "clients", + "igmptable" ], "system": [ "info", diff --git a/luciexpress/share/menu.d/status.json b/luciexpress/share/menu.d/status.json index 09c443655..60051e6c3 100644 --- a/luciexpress/share/menu.d/status.json +++ b/luciexpress/share/menu.d/status.json @@ -13,11 +13,6 @@ "acls": [ "status" ], "index": 9 }, - "status/status/network": { - "title": "Network", - "acls": [ "status" ], - "index": 9 - }, "status/status/dsl": { "title": "DSL", "acls": [ "status" ], diff --git a/luciexpress/tests/lib-juci.js b/luciexpress/tests/lib-juci.js index ed1ba898e..22f3fd6bd 100644 --- a/luciexpress/tests/lib-juci.js +++ b/luciexpress/tests/lib-juci.js @@ -62,6 +62,9 @@ function JUCIMock(){ }, config: function(){} } + self.redirect = function(url){ + console.log("JUCIMock redirect: "+url); + } function LocalStorageMock(){ var _items = {}; this.getItem = function(name){ diff --git a/luciexpress/tests/test-uci.js b/luciexpress/tests/test-uci.js index 04352355b..015fcff23 100644 --- a/luciexpress/tests/test-uci.js +++ b/luciexpress/tests/test-uci.js @@ -46,7 +46,7 @@ describe("UCI", function(){ Object.keys(values).filter(function(x){ return x.indexOf(".") != 0; // filter out hidden values }).map(function(x){ - expect(type).to.have.property(x); + expect(Object.keys(type)).to.contain(x); }); }); next();