From 3abb897eecd27bf7d2f18b67f96c1776e43683bb Mon Sep 17 00:00:00 2001 From: wooferzfg Date: Mon, 2 Mar 2020 20:47:42 -0600 Subject: [PATCH] Reduce rendering test timeouts --- package.json | 2 +- test/rendering-test.js | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index a278932..2cc3030 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "serve": "webpack-dev-server", "start": "webpack-dev-server --open", "start:electron": "webpack --electron && electron dist/index.html", - "test": "mocha --exit --timeout 60000 test/**/*.js || true" + "test": "mocha --exit test/**/*.js || true" }, "author": "", "license": "ISC", diff --git a/test/rendering-test.js b/test/rendering-test.js index b65d608..cc827a9 100644 --- a/test/rendering-test.js +++ b/test/rendering-test.js @@ -13,7 +13,9 @@ const hex64 = require("hex64"); const pixelmatch = require("pixelmatch"); const PNG = require("pngjs").PNG; -describe("Layout Rendering Tests", () => { +describe("Layout Rendering Tests", function() { + this.timeout(40000); + let driver, serverProcess; const LAYOUTS_FOLDER = "test/layouts"; @@ -62,7 +64,9 @@ describe("Layout Rendering Tests", () => { }); const testRendering = (layoutName, splitsName, expectedHash) => { - it(`Renders the ${layoutName} layout with the ${splitsName} splits correctly`, async () => { + it(`Renders the ${layoutName} layout with the ${splitsName} splits correctly`, async function() { + this.timeout(5000); + await clickElement(By.xpath(".//button[contains(text(), 'Layout')]")); await clickElement(By.xpath(".//button[contains(text(), 'Import')]")); await loadFile(`${LAYOUTS_FOLDER}/${layoutName}.ls1l`);