diff --git a/.env b/.env index 8c1a2e1d3..63f15ad5a 100644 --- a/.env +++ b/.env @@ -1,3 +1,4 @@ PUPPETEER_HOST = http://127.0.0.1:8080 PUPPETEER_PORT = 8080 +PUPPETEER_OPEN_CHROME = false \ No newline at end of file diff --git a/.env.example b/.env.example index 8c1a2e1d3..330412d9a 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,4 @@ PUPPETEER_HOST = http://127.0.0.1:8080 PUPPETEER_PORT = 8080 +PUPPETEER_OPEN_CHROME = true diff --git a/.gitignore b/.gitignore index d0e817ccb..2a94264ad 100644 --- a/.gitignore +++ b/.gitignore @@ -38,4 +38,5 @@ npm-debug.log* src/app/architect/ -src/environments/environment.e2e.ts \ No newline at end of file +src/environments/environment.e2e.ts +.env \ No newline at end of file diff --git a/jest-puppeteer.config.js b/jest-puppeteer.config.js index a3cd6fa4c..8deba61ec 100644 --- a/jest-puppeteer.config.js +++ b/jest-puppeteer.config.js @@ -2,16 +2,17 @@ require('dotenv').config() const port = process.env.PUPPETEER_PORT +const host = process.env.PUPPETEER_HOST +const openChrome = process.env.PUPPETEER_OPEN_CHROME module.exports = { server: { - command: `http-server --port ${port} ./www`, + command: `http-server -a 127.0.0.1 --port ${port} ./www`, port: port, launchTimeout: 5000 }, - launch: { dumpio: true, - headless: false, + headless: openChrome != 'true', }, } \ No newline at end of file