// @ts-check import { test, expect } from "@playwright/test"; test("Test de connexion", async ({ page }) => { const account = "Eheheh9400$$!@@"; await page.goto("/register"); await page.waitForURL("/register"); await page .locator( "#layout-container > main > div > form > input[type=text]:nth-child(1)", ) .fill(account); await page .locator( "#layout-container > main > div > form > input[type=password]:nth-child(2)", ) .fill(account); await page .locator( "#layout-container > main > div > form > input[type=password]:nth-child(3)", ) .fill(account); await page .locator("#layout-container > main > div > form > button") .click({ button: "left" }); await page.waitForURL("/"); expect(await page.title()).toBe("Accueil"); expect(await page.locator("#title").innerText()).toBe(`Bonjour ${account} !`); });