From 727213302a449c4a5dd6f3e13c0f43f8d1cea57b Mon Sep 17 00:00:00 2001 From: bidof Date: Tue, 30 Apr 2024 12:59:37 +0200 Subject: [PATCH] asi funciona en la maquina de manera local --- .github/workflows/release.yml | 7 ++----- webapp/e2e/steps/basicButtons-form.steps.js | 2 +- webapp/e2e/steps/customCategoryMode-form.steps.js | 2 +- webapp/e2e/steps/dailyQuestionMode-form.steps.js | 2 +- webapp/e2e/steps/gameBasicMode-form.steps.js | 2 +- webapp/e2e/steps/infinityMode-form.steps.js | 2 +- webapp/e2e/steps/login-form.steps.js | 2 +- webapp/e2e/steps/multiplayerMode-form.steps.js | 4 ++-- webapp/e2e/steps/register-form.steps.js | 2 +- 9 files changed, 11 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ca239dd..19102cc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,15 +55,12 @@ jobs: e2e-tests: needs: [unit-tests] - runs-on: ubuntu-latest + runs-on: self-hosted steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 21 - - run: sudo apt-get install xvfb - - run: Xvfb :99 & - - run: echo "DISPLAY=:99" >> $GITHUB_ENV - run: npm --prefix users/authservice install - run: npm --prefix users/userservice install - run: npm --prefix gatewayservice install @@ -72,7 +69,7 @@ jobs: - run: npm --prefix roomservice install - run: npm --prefix webapp install - run: npm --prefix webapp run build - - run: npm --prefix webapp run test:e2e + - run: xvfb-run --auto-servernum npm --prefix webapp run test:e2e env : CI : "" diff --git a/webapp/e2e/steps/basicButtons-form.steps.js b/webapp/e2e/steps/basicButtons-form.steps.js index 7b3b7f0..08cd415 100644 --- a/webapp/e2e/steps/basicButtons-form.steps.js +++ b/webapp/e2e/steps/basicButtons-form.steps.js @@ -11,7 +11,7 @@ defineFeature(feature, test => { beforeAll(async () => { browser = process.env.GITHUB_ACTIONS ? await puppeteer.launch() - : await puppeteer.launch({ headless: false, slowMo: 0, defaultViewport: { width: 1200, height: 800 }}); + : await puppeteer.launch({ headless: false, slowMo: 0, defaultViewport: { width: 1920, height: 1080 }}); page = await browser.newPage(); //Way of setting up the timeout setDefaultOptions({ timeout: 30000 }) diff --git a/webapp/e2e/steps/customCategoryMode-form.steps.js b/webapp/e2e/steps/customCategoryMode-form.steps.js index 1644eef..f11cd29 100644 --- a/webapp/e2e/steps/customCategoryMode-form.steps.js +++ b/webapp/e2e/steps/customCategoryMode-form.steps.js @@ -11,7 +11,7 @@ defineFeature(feature, test => { beforeAll(async () => { browser = process.env.GITHUB_ACTIONS ? await puppeteer.launch() - : await puppeteer.launch({ headless: false, slowMo: 0, defaultViewport: { width: 1200, height: 800 }}); + : await puppeteer.launch({ headless: false, slowMo: 0, defaultViewport: { width: 1920, height: 1080 }}); page = await browser.newPage(); //Way of setting up the timeout setDefaultOptions({ timeout: 30000 }) diff --git a/webapp/e2e/steps/dailyQuestionMode-form.steps.js b/webapp/e2e/steps/dailyQuestionMode-form.steps.js index cfe1e9e..b504207 100644 --- a/webapp/e2e/steps/dailyQuestionMode-form.steps.js +++ b/webapp/e2e/steps/dailyQuestionMode-form.steps.js @@ -11,7 +11,7 @@ defineFeature(feature, test => { beforeAll(async () => { browser = process.env.GITHUB_ACTIONS ? await puppeteer.launch() - : await puppeteer.launch({ headless: false, slowMo: 0, defaultViewport: { width: 1200, height: 800 }}); + : await puppeteer.launch({ headless: false, slowMo: 0, defaultViewport: { width: 1920, height: 1080 }}); page = await browser.newPage(); //Way of setting up the timeout setDefaultOptions({ timeout: 30000 }) diff --git a/webapp/e2e/steps/gameBasicMode-form.steps.js b/webapp/e2e/steps/gameBasicMode-form.steps.js index 2733b20..db7a3b5 100644 --- a/webapp/e2e/steps/gameBasicMode-form.steps.js +++ b/webapp/e2e/steps/gameBasicMode-form.steps.js @@ -11,7 +11,7 @@ defineFeature(feature, test => { beforeAll(async () => { browser = process.env.GITHUB_ACTIONS ? await puppeteer.launch() - : await puppeteer.launch({ headless: false, slowMo: 0, defaultViewport: { width: 1200, height: 800 }}); + : await puppeteer.launch({ headless: false, slowMo: 0, defaultViewport: { width: 1920, height: 1080 }}); page = await browser.newPage(); //Way of setting up the timeout setDefaultOptions({ timeout: 30000 }) diff --git a/webapp/e2e/steps/infinityMode-form.steps.js b/webapp/e2e/steps/infinityMode-form.steps.js index 6a67c98..43ad453 100644 --- a/webapp/e2e/steps/infinityMode-form.steps.js +++ b/webapp/e2e/steps/infinityMode-form.steps.js @@ -11,7 +11,7 @@ defineFeature(feature, test => { beforeAll(async () => { browser = process.env.GITHUB_ACTIONS ? await puppeteer.launch() - : await puppeteer.launch({ headless: false, slowMo: 0, defaultViewport: { width: 1200, height: 800 }}); + : await puppeteer.launch({ headless: false, slowMo: 0, defaultViewport: { width: 1920, height: 1080}}); page = await browser.newPage(); //Way of setting up the timeout setDefaultOptions({ timeout: 30000 }) diff --git a/webapp/e2e/steps/login-form.steps.js b/webapp/e2e/steps/login-form.steps.js index 4622b25..3b78a85 100644 --- a/webapp/e2e/steps/login-form.steps.js +++ b/webapp/e2e/steps/login-form.steps.js @@ -11,7 +11,7 @@ defineFeature(feature, test => { beforeAll(async () => { browser = process.env.GITHUB_ACTIONS ? await puppeteer.launch() - : await puppeteer.launch({ headless: false, slowMo: 0 , defaultViewport: { width: 1200, height: 800 }}); + : await puppeteer.launch({ headless: false, slowMo: 0 , defaultViewport: { width: 1920, height: 1080 }}); page = await browser.newPage(); //Way of setting up the timeout setDefaultOptions({ timeout: 30000 }) diff --git a/webapp/e2e/steps/multiplayerMode-form.steps.js b/webapp/e2e/steps/multiplayerMode-form.steps.js index 954b504..b6e2600 100644 --- a/webapp/e2e/steps/multiplayerMode-form.steps.js +++ b/webapp/e2e/steps/multiplayerMode-form.steps.js @@ -13,14 +13,14 @@ defineFeature(feature, test => { beforeAll(async () => { browserHost = process.env.GITHUB_ACTIONS ? await puppeteer.launch() - : await puppeteer.launch({ headless: false, slowMo: 0, defaultViewport: { width: 1200, height: 800 }}); + : await puppeteer.launch({ headless: false, slowMo: 0, defaultViewport: { width: 1920, height: 1080 }}); pageHost = await browserHost.newPage(); //Way of setting up the timeout setDefaultOptions({ timeout: 30000 }) browserUser = process.env.GITHUB_ACTIONS ? await puppeteer.launch() - : await puppeteer.launch({ headless: false, slowMo: 0 , defaultViewport: { width: 1200, height: 800 }}); + : await puppeteer.launch({ headless: false, slowMo: 0 , defaultViewport: { width: 1920, height: 1080 }}); pageUser = await browserUser.newPage(); await pageHost diff --git a/webapp/e2e/steps/register-form.steps.js b/webapp/e2e/steps/register-form.steps.js index 89ca29b..fc2a49e 100644 --- a/webapp/e2e/steps/register-form.steps.js +++ b/webapp/e2e/steps/register-form.steps.js @@ -11,7 +11,7 @@ defineFeature(feature, test => { beforeAll(async () => { browser = process.env.GITHUB_ACTIONS ? await puppeteer.launch() - : await puppeteer.launch({ headless: false, slowMo: 0 , defaultViewport: { width: 1200, height: 800 }}); + : await puppeteer.launch({ headless: false, slowMo: 0 , defaultViewport: {width: 1920, height: 1080 }}); page = await browser.newPage(); //Way of setting up the timeout setDefaultOptions({ timeout: 30000 })