From 9f94ba5539c503168c9a88e5a208ba27d331637e Mon Sep 17 00:00:00 2001 From: sergiollende Date: Sun, 28 Apr 2024 15:19:11 +0200 Subject: [PATCH] Changin port e2e 3000 --- webapp/e2e/steps/leaderboard.steps.js | 2 +- webapp/e2e/steps/login-form.steps.js | 2 +- webapp/e2e/steps/logout.steps.js | 2 +- webapp/e2e/steps/normal-game.steps.js | 2 +- webapp/e2e/steps/register-form.steps.js | 2 +- webapp/e2e/steps/statistics.steps.js | 2 +- webapp/e2e/steps/trivia-game.steps.js | 2 +- webapp/package.json | 4 ++-- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/webapp/e2e/steps/leaderboard.steps.js b/webapp/e2e/steps/leaderboard.steps.js index d014640..e46d389 100644 --- a/webapp/e2e/steps/leaderboard.steps.js +++ b/webapp/e2e/steps/leaderboard.steps.js @@ -18,7 +18,7 @@ defineFeature(feature, test => { setDefaultOptions({ timeout: 10000 }) await page - .goto("http://localhost", { + .goto("http://localhost:3000", { waitUntil: "networkidle0", }) .catch(() => {}); diff --git a/webapp/e2e/steps/login-form.steps.js b/webapp/e2e/steps/login-form.steps.js index 2570518..9bc1a62 100644 --- a/webapp/e2e/steps/login-form.steps.js +++ b/webapp/e2e/steps/login-form.steps.js @@ -18,7 +18,7 @@ defineFeature(feature, test => { setDefaultOptions({ timeout: 10000 }) await page - .goto("http://localhost", { + .goto("http://localhost:3000", { waitUntil: "networkidle0", }) .catch(() => {}); diff --git a/webapp/e2e/steps/logout.steps.js b/webapp/e2e/steps/logout.steps.js index cec801e..4a34957 100644 --- a/webapp/e2e/steps/logout.steps.js +++ b/webapp/e2e/steps/logout.steps.js @@ -18,7 +18,7 @@ defineFeature(feature, test => { setDefaultOptions({ timeout: 10000 }) await page - .goto("http://localhost", { + .goto("http://localhost:3000", { waitUntil: "networkidle0", }) .catch(() => {}); diff --git a/webapp/e2e/steps/normal-game.steps.js b/webapp/e2e/steps/normal-game.steps.js index 7c514f5..fcfcdc4 100644 --- a/webapp/e2e/steps/normal-game.steps.js +++ b/webapp/e2e/steps/normal-game.steps.js @@ -18,7 +18,7 @@ defineFeature(feature, test => { setDefaultOptions({ timeout: 10000 }) await page - .goto("http://localhost", { + .goto("http://localhost:3000", { waitUntil: "networkidle0", }) .catch(() => {}); diff --git a/webapp/e2e/steps/register-form.steps.js b/webapp/e2e/steps/register-form.steps.js index e2b6122..9eae318 100644 --- a/webapp/e2e/steps/register-form.steps.js +++ b/webapp/e2e/steps/register-form.steps.js @@ -17,7 +17,7 @@ defineFeature(feature, test => { setDefaultOptions({ timeout: 10000 }) await page - .goto("http://localhost", { + .goto("http://localhost:3000", { waitUntil: "networkidle0", }) .catch(() => {}); diff --git a/webapp/e2e/steps/statistics.steps.js b/webapp/e2e/steps/statistics.steps.js index e7c3adc..c2e3e8f 100644 --- a/webapp/e2e/steps/statistics.steps.js +++ b/webapp/e2e/steps/statistics.steps.js @@ -18,7 +18,7 @@ defineFeature(feature, test => { setDefaultOptions({ timeout: 10000 }) await page - .goto("http://localhost", { + .goto("http://localhost:3000", { waitUntil: "networkidle0", }) .catch(() => {}); diff --git a/webapp/e2e/steps/trivia-game.steps.js b/webapp/e2e/steps/trivia-game.steps.js index 3cabb76..c4cabfe 100644 --- a/webapp/e2e/steps/trivia-game.steps.js +++ b/webapp/e2e/steps/trivia-game.steps.js @@ -18,7 +18,7 @@ defineFeature(feature, test => { setDefaultOptions({ timeout: 10000 }) await page - .goto("http://localhost", { + .goto("http://localhost:3000", { waitUntil: "networkidle0", }) .catch(() => {}); diff --git a/webapp/package.json b/webapp/package.json index 50bbb0d..82f5410 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -35,10 +35,10 @@ "scripts": { "start": "set PORT=80 && set HTTP=true && react-scripts start", "build": "set PORT=80 && set HTTP=true && react-scripts build", - "prod": "serve -s build", + "prod": "serve -s build -l 3000", "test": "react-scripts test --transformIgnorePatterns 'node_modules/(?!axios)/'", "test:e2e": "cross-env START_SERVER_AND_TEST_INSECURE=1 PORT=80 npm run rune2etests", - "rune2etests": "start-server-and-test 'node e2e/test-environment-setup.js' http://localhost:8000/health prod 80 \"cd e2e && jest\"", + "rune2etests": "start-server-and-test 'node e2e/test-environment-setup.js' http://localhost:8000/health prod 3000 \"cd e2e && jest\"", "eject": "react-scripts eject" }, "eslintConfig": {