From 1e1f7d6ee7495e6af91f0cbe5a102ca2af97ddb1 Mon Sep 17 00:00:00 2001 From: uo285427 Date: Wed, 1 May 2024 10:38:20 +0200 Subject: [PATCH] arreglos --- webapp/e2e/steps/play-game.steps.js | 2 +- webapp/e2e/steps/settings.steps.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/webapp/e2e/steps/play-game.steps.js b/webapp/e2e/steps/play-game.steps.js index ab383183..18dc13ed 100644 --- a/webapp/e2e/steps/play-game.steps.js +++ b/webapp/e2e/steps/play-game.steps.js @@ -12,7 +12,7 @@ defineFeature(feature, test => { beforeAll(async () => { browser = process.env.GITHUB_ACTIONS ? await puppeteer.launch() - : await puppeteer.launch({ headless: false, slowMo: 1 }); + : await puppeteer.launch({ headless: false, slowMo: 1, defaultViewport: { width: 1200, height: 800 }}); page = await browser.newPage(); setDefaultOptions({ timeout: 10000 }) diff --git a/webapp/e2e/steps/settings.steps.js b/webapp/e2e/steps/settings.steps.js index 344d68c7..8f6c2d78 100644 --- a/webapp/e2e/steps/settings.steps.js +++ b/webapp/e2e/steps/settings.steps.js @@ -12,7 +12,7 @@ defineFeature(feature, test => { beforeAll(async () => { browser = process.env.GITHUB_ACTIONS ? await puppeteer.launch() - : await puppeteer.launch({ headless: false, slowMo: 100 }); + : await puppeteer.launch({ headless: false, slowMo: 100, defaultViewport: { width: 1200, height: 800 }}); page = await browser.newPage(); setDefaultOptions({ timeout: 10000 }) @@ -54,6 +54,7 @@ defineFeature(feature, test => { changeSliderValueTo5(); }); then('the game settings should be updated', async () => { + await page.waitForSelector('button', { text: 'Jugar' }); await expect(page).toClick('button', { text: 'Jugar' }); await expect(page).toClick('button', { text: 'Comenzar a jugar' }) await expect(page).toMatchElement("h1", { text: 'Pregunta NĂºmero 1' }); @@ -105,7 +106,9 @@ defineFeature(feature, test => { for (let i = 0; i < steps; i++) { await page.mouse.move(sliderMidX - 50, sliderMidY, { steps: 10 }); } + await page.waitForTimeout(500); await page.mouse.up(); } + });