Files
2024_DEV_BUT3/tests/authenticated/register.test.js
pro.boooooo 873dd8c458 $
2024-04-03 03:46:05 +02:00

34 lines
895 B
JavaScript

// @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} !`);
});