diff --git a/webapp/e2e/test-environment-setup.js b/webapp/e2e/test-environment-setup.js index b37b1736..a84c4a89 100644 --- a/webapp/e2e/test-environment-setup.js +++ b/webapp/e2e/test-environment-setup.js @@ -1,6 +1,7 @@ const { MongoMemoryServer } = require('mongodb-memory-server'); const testUtils = require('./testUtils.js'); const axios = require('axios'); +const exec = require('child_process').exec; let mongoserver; @@ -16,6 +17,16 @@ async function startServer() { const mongoUri = mongoserver.getUri(); process.env.MONGODB_URI = mongoUri; + //Start webapp + console.log('Starting react app.'); + exec('npm start', (err, stdout, stderr) => { + if (err) { + console.error(err); + return; + } + console.log(stdout); + }); + userservice = await require("../../users/userservice/user-service"); authservice = await require("../../users/authservice/auth-service"); gatewayservice = await require("../../gatewayservice/gateway-service");