Create class

This commit is contained in:
Tibo De Peuter 2025-05-03 13:43:23 +02:00
parent 509dd6bfab
commit 170f45b719
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2

View file

@ -0,0 +1,18 @@
import { test, expect } from "@playwright/test"
test("Teacher create a class", async ({ page }) => {
await page.goto("/")
// Login
await page.getByRole("link", { name: "log in" }).click();
await page.getByRole("button", { name: "teacher" }).click();
await page.getByRole("textbox", { name: "Username or email" }).fill("testleerkracht1");
await page.getByRole("textbox", { name: "Password" }).fill("password");
await page.getByRole("button", { name: "Sign In" }).click();
// Go to class
await page.getByRole("button", { name: "Classes" }).click()
await expect(page.locator("h1")).toContainText("Classes");
await expect(page.locator("button")).toBeVisible();
});