From 9ed4f121b165fc30d7e87e4c56e11c0b0ee99903 Mon Sep 17 00:00:00 2001 From: Alasdair Smith Date: Wed, 7 Mar 2018 09:51:54 +0000 Subject: [PATCH 1/2] Append fixture el to actual DOM --- services/web/test/unit_frontend/es/support/fixture.js | 1 + 1 file changed, 1 insertion(+) diff --git a/services/web/test/unit_frontend/es/support/fixture.js b/services/web/test/unit_frontend/es/support/fixture.js index 38c71f1650..17babff718 100644 --- a/services/web/test/unit_frontend/es/support/fixture.js +++ b/services/web/test/unit_frontend/es/support/fixture.js @@ -1,6 +1,7 @@ class Fixture { constructor () { this.el = document.createElement('div') + document.body.appendChild(this.el) } load (html) { From 8bde5120ddef74bd3d92474d68c07f292fca1718 Mon Sep 17 00:00:00 2001 From: Alasdair Smith Date: Wed, 7 Mar 2018 09:52:08 +0000 Subject: [PATCH 2/2] Change frontend test commands so its easier to run locally in debug mode --- services/web/docker-compose.yml | 2 +- services/web/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/web/docker-compose.yml b/services/web/docker-compose.yml index b6649b65d3..5a668bc4a3 100644 --- a/services/web/docker-compose.yml +++ b/services/web/docker-compose.yml @@ -29,7 +29,7 @@ services: volumes: - .:/app working_dir: /app - command: npm run test:frontend + command: npm run test:frontend -- --single-run redis: image: redis diff --git a/services/web/package.json b/services/web/package.json index 75b83e6ac6..895f979f15 100644 --- a/services/web/package.json +++ b/services/web/package.json @@ -15,7 +15,7 @@ "test:acceptance:dir": "npm -q run test:acceptance:wait_for_app && npm -q run test:acceptance:run -- $@", "test:acceptance": "npm -q run test:acceptance:dir -- $@ test/acceptance/js", "test:unit": "npm -q run compile && bin/unit_test $@", - "test:frontend": "karma start --single-run", + "test:frontend": "karma start", "compile": "make compile", "start": "npm -q run compile && node $NODE_APP_OPTIONS app.js", "nodemon": "nodemon --config nodemon.json",