From 17e8c6bd7b3516728186e680c44d5b1dfb5add4a Mon Sep 17 00:00:00 2001 From: carlospelazas Date: Mon, 6 May 2024 19:25:49 +0200 Subject: [PATCH] remove headless from puppeteer configuration --- webapp/e2e/steps/register-form.steps.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/webapp/e2e/steps/register-form.steps.js b/webapp/e2e/steps/register-form.steps.js index fb91978..0f7ab8f 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: 100 }); + : await puppeteer.launch({ slowMo: 100 }); page = await browser.newPage(); //Way of setting up the timeout setDefaultOptions({ timeout: 10000 }) @@ -38,7 +38,8 @@ defineFeature(feature, test => { when('I fill the data in the form and press submit', async () => { await page.type('input[name="username"]', username); await page.type('input[name="password"]', password); - await page.click('button', { text: 'Add User' }) + await page.waitForSelector('button') + await page.click('button', { text: 'Registrarse' }) }); then('Should be inside the game route', async () => {