Create class
This commit is contained in:
parent
509dd6bfab
commit
170f45b719
1 changed files with 18 additions and 0 deletions
18
frontend/e2e/class.spec.ts
Normal file
18
frontend/e2e/class.spec.ts
Normal 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();
|
||||||
|
});
|
Loading…
Add table
Add a link
Reference in a new issue