diff --git a/test/functional/block.js b/test/functional/block.js index 366c10e..ed2b717 100644 --- a/test/functional/block.js +++ b/test/functional/block.js @@ -4,21 +4,25 @@ const utils = require("./lib/utils"); const injected = require("./lib/injected"); const testServer = require("./lib/server"); -describe("Basic", function () { +describe("Basic Functionality", function () { const svgTestScript = injected.testSVGTestScript(); let httpServer; let testUrl; - this.timeout = function () { - return 10000; - }; - describe("blocking", function () { + this.timeout = function () { + return 20000; + }; + it("SVG Not Blocking", function (done) { + this.timeout = function () { + return 10000; + }; + const [server, url] = testServer.start(); testUrl = url; @@ -50,6 +54,10 @@ describe("Basic", function () { it("SVG blocking", function (done) { + this.timeout = function () { + return 10000; + }; + const [server, url] = testServer.start(); testUrl = url; @@ -77,8 +85,12 @@ describe("Basic", function () { }); }); - it("iFrame contentWindow without src", function (done) { + it("iframe contentWindow without src", function (done) { + this.timeout = function () { + return 10000; + }; + const testHtml = ` @@ -89,7 +101,7 @@ describe("Basic", function () { `; - const iframeContentWindowScript = 'document.getElementsByTagName("iframe")[0].contentWindow.SVGGraphicsElement.prototype.getBBox().bartSimpson'; + const iframeContentWindowScript = "document.getElementsByTagName('iframe')[0].contentWindow.SVGGraphicsElement.prototype.getBBox()"; const [server, url] = testServer.start(undefined, testHtml); @@ -105,8 +117,8 @@ describe("Basic", function () { return utils.promiseSetBlockingRules(driver, standardsToBlock); }) .then(() => driverReference.get(testUrl)) - .then(() => driverReference.executeAsyncScript(iframeContentWindowScript)) - .then(function (output) { + .then(() => driverReference.executeScript(iframeContentWindowScript)) + .then(function () { driverReference.quit(); testServer.stop(httpServer); done(); @@ -116,6 +128,7 @@ describe("Basic", function () { testServer.stop(httpServer); done(e); }); - }) + }); + }); }); diff --git a/test/functional/csp.js b/test/functional/csp.js index 66a54a8..d876830 100644 --- a/test/functional/csp.js +++ b/test/functional/csp.js @@ -4,7 +4,7 @@ const utils = require("./lib/utils"); const injected = require("./lib/injected"); const testServer = require("./lib/server"); -describe("Content-Security-Protocol tests", function () { +describe("Content-Security-Protocol Issues", function () { describe("script-src", function () { diff --git a/test/functional/logins.js b/test/functional/logins.js index 6f54277..bbcdb3a 100644 --- a/test/functional/logins.js +++ b/test/functional/logins.js @@ -13,7 +13,6 @@ const keys = webdriver.Key; const by = webdriver.By; const until = webdriver.until; - describe("Logging into popular sites", function () { describe("GitHub", function () {