diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5bd02d30..4a506744 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -71,7 +71,7 @@ jobs: - run: npm --prefix roomservice install - run: npm --prefix webapp install - run: npm --prefix webapp run build - - run: xvfb-run --auto-servernum npm --prefix webapp run test:e2e + - run: npm --prefix webapp run test:e2e env : CI : "" diff --git a/webapp/e2e/jest.config.js b/webapp/e2e/jest.config.js index db3be3d9..d94caac2 100644 --- a/webapp/e2e/jest.config.js +++ b/webapp/e2e/jest.config.js @@ -1,5 +1,5 @@ module.exports = { testMatch: ["**/steps/*.js"], - testTimeout: 30000, + testTimeout: 150000, setupFilesAfterEnv: ["expect-puppeteer"] } \ No newline at end of file diff --git a/webapp/e2e/steps/basicButtons-form.steps.js b/webapp/e2e/steps/basicButtons-form.steps.js index 45904773..4e9f23f5 100644 --- a/webapp/e2e/steps/basicButtons-form.steps.js +++ b/webapp/e2e/steps/basicButtons-form.steps.js @@ -13,8 +13,6 @@ defineFeature(feature, test => { ? await puppeteer.launch() : await puppeteer.launch({ headless: false, slowMo: 20 }); page = await browser.newPage(); - //Way of setting up the timeout - setDefaultOptions({ timeout: 10000 }) await page .goto("http://localhost:3000/addUser", { diff --git a/webapp/e2e/steps/dailyQuestionMode-form.steps.js b/webapp/e2e/steps/dailyQuestionMode-form.steps.js index d4ffeca0..c276ad39 100644 --- a/webapp/e2e/steps/dailyQuestionMode-form.steps.js +++ b/webapp/e2e/steps/dailyQuestionMode-form.steps.js @@ -14,7 +14,6 @@ defineFeature(feature, test => { : await puppeteer.launch({ headless: false, slowMo: 20 }); page = await browser.newPage(); //Way of setting up the timeout - setDefaultOptions({ timeout: 10000 }) await page .goto("http://localhost:3000/addUser", { diff --git a/webapp/e2e/steps/gameBasicMode-form.steps.js b/webapp/e2e/steps/gameBasicMode-form.steps.js index f077b68a..975f0b23 100644 --- a/webapp/e2e/steps/gameBasicMode-form.steps.js +++ b/webapp/e2e/steps/gameBasicMode-form.steps.js @@ -14,7 +14,7 @@ defineFeature(feature, test => { : await puppeteer.launch({ headless: false, slowMo: 20 }); page = await browser.newPage(); //Way of setting up the timeout - setDefaultOptions({ timeout: 10000 }) + //setDefaultOptions({ timeout: 10000 }) ONLY USE IF MORE TIME THAN DEFAULT IS REQUIRED await page .goto("http://localhost:3000/addUser", { diff --git a/webapp/e2e/steps/login-form.steps.js b/webapp/e2e/steps/login-form.steps.js index 5a800402..6858eeaf 100644 --- a/webapp/e2e/steps/login-form.steps.js +++ b/webapp/e2e/steps/login-form.steps.js @@ -13,8 +13,7 @@ defineFeature(feature, test => { ? await puppeteer.launch() : await puppeteer.launch({ headless: false, slowMo: 50 }); page = await browser.newPage(); - //Way of setting up the timeout - setDefaultOptions({ timeout: 10000 }) + await page .goto("http://localhost:3000/login", { diff --git a/webapp/e2e/steps/multiplayerMode-form.steps.js b/webapp/e2e/steps/multiplayerMode-form.steps.js index cf0cfc69..95e81342 100644 --- a/webapp/e2e/steps/multiplayerMode-form.steps.js +++ b/webapp/e2e/steps/multiplayerMode-form.steps.js @@ -15,15 +15,14 @@ defineFeature(feature, test => { ? await puppeteer.launch() : await puppeteer.launch({ headless: false, slowMo: 20 }); pageHost = await browserHost.newPage(); - //Way of setting up the timeout - setDefaultOptions({ timeout: 10000 }) + browserUser = process.env.GITHUB_ACTIONS ? await puppeteer.launch() : await puppeteer.launch({ headless: false, slowMo: 20 }); pageUser = await browserUser.newPage(); //Way of setting up the timeout - setDefaultOptions({ timeout: 10000 }) + await pageHost .goto("http://localhost:3000/addUser", {