From 12b9845dfb7cee8882eac15576ca8727abdf8f57 Mon Sep 17 00:00:00 2001 From: Brieuc Dubois <git@bhasher.com> Date: Thu, 12 Jun 2025 15:03:30 +0200 Subject: [PATCH] Fix test CI --- .gitlab-ci.yml | 20 +++++++++++++++++--- e2e-tests/tests/auth.spec.ts | 6 +++--- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a1a258fc..5e103b36 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,16 +27,30 @@ playwright_tests: - merge_requests image: node:lts before_script: - - cd e2e-tests + # Install Python and pip + - apt-get update -y + - apt-get install -y python3 python3-pip python3-venv + # Set up backend Python environment + - cd backend + - python3 -m venv .env + - source .env/bin/activate + - pip install -r requirements.txt + - cd ../ + # Set up frontend Node.js environment + - cd frontend - npm install -g pnpm - pnpm install - - pnpm exec playwright install --with-deps + - cd ../ + # Set up e2e-tests environment + - cd e2e-tests + - pnpm install + - pnpm exec playwright install chromium --with-deps script: - pnpm exec playwright test artifacts: when: always paths: - - playwright-report/ + - e2e-tests/playwright-report/ expire_in: 30 days timeout: 60m diff --git a/e2e-tests/tests/auth.spec.ts b/e2e-tests/tests/auth.spec.ts index f19d80db..d73106f6 100644 --- a/e2e-tests/tests/auth.spec.ts +++ b/e2e-tests/tests/auth.spec.ts @@ -95,13 +95,13 @@ test("Register a tutor", async ({ page }) => { .fill("Une courte biographie"); await page.getByRole("button", { name: "Envoyer" }).click(); - await page.waitForTimeout(100); + await page.waitForTimeout(500); await page.getByTestId("weekday").selectOption("thursday"); await page.getByTestId("startTime").selectOption("10:00"); await page.getByTestId("endTime").selectOption("11:00"); - await page.waitForTimeout(100); + await page.waitForTimeout(500); await page.getByRole("button", { name: "Ajouter disponibilité" }).click(); - await page.waitForTimeout(100); + await page.waitForTimeout(500); await page.getByRole("button", { name: "Envoyer" }).click(); await page.getByRole("link", { name: "LanguageLab" }).click(); -- GitLab