$
This commit is contained in:
26
tests/authenticated/login.test.js
Normal file
26
tests/authenticated/login.test.js
Normal file
@@ -0,0 +1,26 @@
|
||||
// @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);
|
||||
});
|
Reference in New Issue
Block a user