From 2b26b5f83a30d21b61b10c0d1a3850148f6c28df Mon Sep 17 00:00:00 2001 From: florimondmanca Date: Mon, 29 Aug 2022 16:19:45 +0200 Subject: [PATCH] Fix usage of demo account in dev and ci setup --- client/src/tests/e2e/constants.ts | 2 +- client/src/tests/e2e/login.spec.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/tests/e2e/constants.ts b/client/src/tests/e2e/constants.ts index 79ba40c8e..bdf165d47 100644 --- a/client/src/tests/e2e/constants.ts +++ b/client/src/tests/e2e/constants.ts @@ -1,5 +1,5 @@ export const TEST_EMAIL = "catalogue.demo@yopmail.com"; -export const TEST_PASSWORD = "demo"; +export const TEST_PASSWORD = "password1234"; export const ADMIN_EMAIL = "admin@catalogue.data.gouv.fr"; export const STATE_AUTHENTICATED = "./src/tests/e2e/storage/authenticated.json"; export const STATE_AUTHENTICATED_ADMIN = diff --git a/client/src/tests/e2e/login.spec.ts b/client/src/tests/e2e/login.spec.ts index 740ecc478..b3636a458 100644 --- a/client/src/tests/e2e/login.spec.ts +++ b/client/src/tests/e2e/login.spec.ts @@ -1,5 +1,5 @@ import { expect } from "@playwright/test"; -import { TEST_EMAIL } from "./constants"; +import { TEST_EMAIL, TEST_PASSWORD } from "./constants"; import { test } from "./fixtures"; test.describe("Login", () => { @@ -21,8 +21,8 @@ test.describe("Login", () => { expect(await email.inputValue()).toBe(TEST_EMAIL); const password = page.locator("form [name=password]"); - await password.fill("demo"); - expect(await password.inputValue()).toBe("demo"); + await password.fill(TEST_PASSWORD); + expect(await password.inputValue()).toBe(TEST_PASSWORD); const button = page.locator("button[type='submit']"); const [request, response] = await Promise.all([