diff --git a/webapp/e2e/steps/create-group.steps.js b/webapp/e2e/steps/create-group.steps.js index 4728d3b9..2c27b4df 100644 --- a/webapp/e2e/steps/create-group.steps.js +++ b/webapp/e2e/steps/create-group.steps.js @@ -8,6 +8,23 @@ const feature = loadFeature("./features/create-group.feature"); let page; let browser; +function generateUUID() { + const hexDigits = '0123456789abcdef'; + let uuid = ''; + for (let i = 0; i < 36; i++) { + if (i === 8 || i === 13 || i === 18 || i === 23) { + uuid += '-'; + } else if (i === 14) { + uuid += '4'; + } else if (i === 19) { + uuid += hexDigits.charAt(Math.floor(Math.random() * 4) + 8); + } else { + uuid += hexDigits.charAt(Math.floor(Math.random() * 16)); + } + } + return uuid; +} + defineFeature(feature, (test) => { beforeAll(async () => { browser = process.env.GITHUB_ACTIONS diff --git a/webapp/e2e/steps/login-form.steps.js b/webapp/e2e/steps/login-form.steps.js index b643568e..6e298965 100644 --- a/webapp/e2e/steps/login-form.steps.js +++ b/webapp/e2e/steps/login-form.steps.js @@ -70,8 +70,8 @@ defineFeature(feature, (test) => { }); test("The user is registered in the site", ({ given, when, then }) => { - let username; - let password; + var username; + var password; given("A registered user", async () => { username = "testuser"; diff --git a/webapp/e2e/steps/register-form.steps.js b/webapp/e2e/steps/register-form.steps.js index df2ff179..2e965f96 100644 --- a/webapp/e2e/steps/register-form.steps.js +++ b/webapp/e2e/steps/register-form.steps.js @@ -87,8 +87,8 @@ defineFeature(feature, (test) => { }); test("The user is not registered in the site", ({ given, when, then }) => { - let username; - let password; + var username; + var password; given("An unregistered user", async () => { await expect(page).toClick("a", { text: "RegĂ­strate" });