Skip to content

Commit

Permalink
Adding a default timeout, removing the custom ones
Browse files Browse the repository at this point in the history
  • Loading branch information
augustocristian committed Apr 30, 2024
1 parent 7bf3756 commit 298dd11
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 : ""

Expand Down
2 changes: 1 addition & 1 deletion webapp/e2e/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
testMatch: ["**/steps/*.js"],
testTimeout: 30000,
testTimeout: 150000,
setupFilesAfterEnv: ["expect-puppeteer"]
}
2 changes: 0 additions & 2 deletions webapp/e2e/steps/basicButtons-form.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -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", {
Expand Down
1 change: 0 additions & 1 deletion webapp/e2e/steps/dailyQuestionMode-form.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -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", {
Expand Down
2 changes: 1 addition & 1 deletion webapp/e2e/steps/gameBasicMode-form.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -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", {
Expand Down
3 changes: 1 addition & 2 deletions webapp/e2e/steps/login-form.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -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", {
Expand Down
5 changes: 2 additions & 3 deletions webapp/e2e/steps/multiplayerMode-form.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -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", {
Expand Down

0 comments on commit 298dd11

Please sign in to comment.