Files
2024_DEV_BUT3/tests/authenticated/login.test.js
pro.boooooo 7402661aaa $
2024-04-01 12:55:40 +02:00

27 lines
680 B
JavaScript

// @ts-check
import { test, expect } from "@playwright/test";
import { waitFor } from "@testing-library/react";
test("Test de connexion", async ({ page }) => {
await page.goto("/login");
await page
.locator(
"#layout-container > main > div > form > input[type=text]:nth-child(1)",
)
.fill("Bilouuuuuuu94!@@");
await page
.locator(
"#layout-container > main > div > form > input[type=password]:nth-child(2)",
)
.fill("Bilouuuuuuu94!@@");
await page.locator("#layout-container > main > div > form > button").click({
button: "left",
});
await page.waitForURL("/");
const title = await page.title();
console.log(title);
});