From ef4567560ab9b00b1282004a7aa3db9840391e20 Mon Sep 17 00:00:00 2001 From: Dario Date: Wed, 1 May 2024 15:38:45 +0200 Subject: [PATCH] fix: register testing --- webapp/e2e/jest.config.js | 2 +- webapp/e2e/steps/register_positive_form.steps.js | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/webapp/e2e/jest.config.js b/webapp/e2e/jest.config.js index fb604138..6cc209bf 100644 --- a/webapp/e2e/jest.config.js +++ b/webapp/e2e/jest.config.js @@ -1,5 +1,5 @@ module.exports = { - testMatch: ["**/steps/login_positive.steps.js"], + testMatch: ["**/steps/register_positive_form.steps.js"], moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"], testTimeout: 30000 } \ No newline at end of file diff --git a/webapp/e2e/steps/register_positive_form.steps.js b/webapp/e2e/steps/register_positive_form.steps.js index d0ac8b4d..4c7e7e90 100644 --- a/webapp/e2e/steps/register_positive_form.steps.js +++ b/webapp/e2e/steps/register_positive_form.steps.js @@ -11,8 +11,8 @@ defineFeature(feature, test => { beforeAll(async () => { browser = process.env.GITHUB_ACTIONS - ? await puppeteer.launch() - : await puppeteer.launch({ headless: false, slowMo: 100 }); + ? await puppeteer.launch({ ignoreHTTPSErrors: true}) + : await puppeteer.launch({ headless: false, slowMo: 100, ignoreHTTPSErrors: true }); page = await browser.newPage(); //Way of setting up the timeout setDefaultOptions({ timeout: 10000 }) @@ -31,9 +31,7 @@ defineFeature(feature, test => { // Convert bytes to hex let hexString = randomBytes.toString('hex'); // Take the first 16 characters - let randomHash = hexString.substring(0, 20); - - + let randomHash = hexString.substring(0, 4); let username = "test" + randomHash let user = username + "@email.com"