This commit is contained in:
pro.boooooo
2024-04-03 03:46:05 +02:00
parent 7402661aaa
commit 873dd8c458
25 changed files with 404 additions and 129 deletions

View File

@@ -0,0 +1,33 @@
// @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} !`);
});