style: fix linting issues met Prettier

This commit is contained in:
Lint Action 2025-05-16 20:55:28 +00:00
parent 8e94462470
commit 230fa8d370
3 changed files with 92 additions and 92 deletions

View file

@ -1,7 +1,7 @@
import { test, expect } from '@playwright/test'; import { test, expect } from "@playwright/test";
test('Teacher can create new assignment', async ({ page }) => { test("Teacher can create new assignment", async ({ page }) => {
await page.goto("/") await page.goto("/");
// Login // Login
await page.getByRole("link", { name: "log in" }).click(); await page.getByRole("link", { name: "log in" }).click();
@ -11,35 +11,35 @@ test('Teacher can create new assignment', async ({ page }) => {
await page.getByRole("button", { name: "Sign In" }).click(); await page.getByRole("button", { name: "Sign In" }).click();
// Go to assignments // Go to assignments
await expect(page.getByRole('banner').getByRole('link', { name: 'Assignments' })).toBeVisible(); await expect(page.getByRole("banner").getByRole("link", { name: "Assignments" })).toBeVisible();
await page.getByRole('banner').getByRole('link', { name: 'Assignments' }).click(); await page.getByRole("banner").getByRole("link", { name: "Assignments" }).click();
await expect(page.getByRole('heading', { name: 'Assignments' })).toBeVisible(); await expect(page.getByRole("heading", { name: "Assignments" })).toBeVisible();
await expect(page.getByRole('button', { name: 'New Assignment' })).toBeVisible(); await expect(page.getByRole("button", { name: "New Assignment" })).toBeVisible();
// Create new assignment // Create new assignment
await page.getByRole('button', { name: 'New Assignment' }).click(); await page.getByRole("button", { name: "New Assignment" }).click();
await expect(page.getByRole('button', { name: 'submit' })).toBeVisible(); await expect(page.getByRole("button", { name: "submit" })).toBeVisible();
await expect(page.getByRole('link', { name: 'cancel' })).toBeVisible(); await expect(page.getByRole("link", { name: "cancel" })).toBeVisible();
await page.getByRole('textbox', { name: 'Title Title' }).fill('Assignment test 1'); await page.getByRole("textbox", { name: "Title Title" }).fill("Assignment test 1");
await page.getByRole('textbox', { name: 'Select a learning path Select' }).click(); await page.getByRole("textbox", { name: "Select a learning path Select" }).click();
await page.getByText('Using notebooks').click(); await page.getByText("Using notebooks").click();
await page.getByRole('textbox', { name: 'Pick a class Pick a class' }).click(); await page.getByRole("textbox", { name: "Pick a class Pick a class" }).click();
await page.getByText('class01').click(); await page.getByText("class01").click();
await page.getByRole('textbox', { name: 'Select Deadline Select' }).fill('2099-01-01T12:34'); await page.getByRole("textbox", { name: "Select Deadline Select" }).fill("2099-01-01T12:34");
await page.getByRole('textbox', { name: 'Description Description' }).fill('Assignment description'); await page.getByRole("textbox", { name: "Description Description" }).fill("Assignment description");
await page.getByRole('button', { name: 'submit' }).click(); await page.getByRole("button", { name: "submit" }).click();
await expect(page.getByText('Assignment test')).toBeVisible(); await expect(page.getByText("Assignment test")).toBeVisible();
await expect(page.getByRole('main').getByRole('button').first()).toBeVisible(); await expect(page.getByRole("main").getByRole("button").first()).toBeVisible();
await expect(page.getByRole('main')).toContainText('Assignment test 1'); await expect(page.getByRole("main")).toContainText("Assignment test 1");
await expect(page.getByRole('link', { name: 'Learning path' })).toBeVisible(); await expect(page.getByRole("link", { name: "Learning path" })).toBeVisible();
await expect(page.getByRole('main')).toContainText('Assignment description'); await expect(page.getByRole("main")).toContainText("Assignment description");
}); });
test("Student can see list of assignments", async ({ page }) => { test("Student can see list of assignments", async ({ page }) => {
await page.goto("/") await page.goto("/");
// Login // Login
await page.getByRole("link", { name: "log in" }).click(); await page.getByRole("link", { name: "log in" }).click();
@ -49,16 +49,16 @@ test("Student can see list of assignments", async ({ page }) => {
await page.getByRole("button", { name: "Sign In" }).click(); await page.getByRole("button", { name: "Sign In" }).click();
// Go to assignments // Go to assignments
await expect(page.getByRole('banner').getByRole('link', { name: 'Assignments' })).toBeVisible(); await expect(page.getByRole("banner").getByRole("link", { name: "Assignments" })).toBeVisible();
await page.getByRole('banner').getByRole('link', { name: 'Assignments' }).click(); await page.getByRole("banner").getByRole("link", { name: "Assignments" }).click();
await expect(page.getByRole('heading', { name: 'Assignments' })).toBeVisible(); await expect(page.getByRole("heading", { name: "Assignments" })).toBeVisible();
await expect(page.getByText('dire straits')).toBeVisible(); await expect(page.getByText("dire straits")).toBeVisible();
await expect(page.locator('.button-row > .v-btn').first()).toBeVisible(); await expect(page.locator(".button-row > .v-btn").first()).toBeVisible();
await expect(page.getByText('Class: class01').first()).toBeVisible(); await expect(page.getByText("Class: class01").first()).toBeVisible();
}); });
test('Student can see assignment details', async ({ page }) => { test("Student can see assignment details", async ({ page }) => {
await page.goto("/") await page.goto("/");
// Login // Login
await page.getByRole("link", { name: "log in" }).click(); await page.getByRole("link", { name: "log in" }).click();
@ -68,14 +68,14 @@ test('Student can see assignment details', async ({ page }) => {
await page.getByRole("button", { name: "Sign In" }).click(); await page.getByRole("button", { name: "Sign In" }).click();
// Go to assignments // Go to assignments
await expect(page.getByRole('banner').getByRole('link', { name: 'Assignments' })).toBeVisible(); await expect(page.getByRole("banner").getByRole("link", { name: "Assignments" })).toBeVisible();
await page.getByRole('banner').getByRole('link', { name: 'Assignments' }).click(); await page.getByRole("banner").getByRole("link", { name: "Assignments" }).click();
await expect(page.getByText('Assignment: Conditional')).toBeVisible(); await expect(page.getByText("Assignment: Conditional")).toBeVisible();
await expect(page.locator('div:nth-child(2) > .v-card > .button-row > .v-btn')).toBeVisible(); await expect(page.locator("div:nth-child(2) > .v-card > .button-row > .v-btn")).toBeVisible();
// View assignment details // View assignment details
await page.locator('div:nth-child(2) > .v-card > .button-row > .v-btn').click(); await page.locator("div:nth-child(2) > .v-card > .button-row > .v-btn").click();
await expect(page.getByText('Assignment: Conditional')).toBeVisible(); await expect(page.getByText("Assignment: Conditional")).toBeVisible();
await expect(page.getByRole('link', { name: 'Learning path' })).toBeVisible(); await expect(page.getByRole("link", { name: "Learning path" })).toBeVisible();
await expect(page.getByRole('progressbar').locator('div').first()).toBeVisible(); await expect(page.getByRole("progressbar").locator("div").first()).toBeVisible();
}); });

View file

@ -1,7 +1,7 @@
import { test, expect } from "@playwright/test" import { test, expect } from "@playwright/test";
test("Users can filter", async ({ page }) => { test("Users can filter", async ({ page }) => {
await page.goto("/") await page.goto("/");
// Login // Login
await page.getByRole("link", { name: "log in" }).click(); await page.getByRole("link", { name: "log in" }).click();

View file

@ -1,9 +1,9 @@
import { test, expect } from "@playwright/test" import { test, expect } from "@playwright/test";
test("Teacher can create a class", async ({ page }) => { test("Teacher can create a class", async ({ page }) => {
const className = "DeTijdLoze" const className = "DeTijdLoze";
await page.goto("/") await page.goto("/");
// Login // Login
await page.getByRole("link", { name: "log in" }).click(); await page.getByRole("link", { name: "log in" }).click();
@ -13,26 +13,26 @@ test("Teacher can create a class", async ({ page }) => {
await page.getByRole("button", { name: "Sign In" }).click(); await page.getByRole("button", { name: "Sign In" }).click();
// Go to class // Go to class
await expect(page.getByRole('banner').getByRole('link', { name: 'Classes' })).toBeVisible(); await expect(page.getByRole("banner").getByRole("link", { name: "Classes" })).toBeVisible();
await page.getByRole('banner').getByRole('link', { name: 'Classes' }).click(); await page.getByRole("banner").getByRole("link", { name: "Classes" }).click();
// Check if the class page is visible // Check if the class page is visible
await expect(page.getByRole('heading', { name: 'Classes' })).toBeVisible(); await expect(page.getByRole("heading", { name: "Classes" })).toBeVisible();
await expect(page.getByRole('textbox', { name: 'classname classname' })).toBeVisible(); await expect(page.getByRole("textbox", { name: "classname classname" })).toBeVisible();
await expect(page.getByRole('button', { name: 'create' })).toBeVisible(); await expect(page.getByRole("button", { name: "create" })).toBeVisible();
// Create a class // Create a class
await page.getByRole('textbox', { name: 'classname classname' }).click(); await page.getByRole("textbox", { name: "classname classname" }).click();
await page.getByRole('textbox', { name: 'classname classname' }).fill(className); await page.getByRole("textbox", { name: "classname classname" }).fill(className);
await page.getByRole('button', { name: 'create' }).click(); await page.getByRole("button", { name: "create" }).click();
// Check if the class is created // Check if the class is created
await expect(page.getByRole('dialog').getByText('code')).toBeVisible(); await expect(page.getByRole("dialog").getByText("code")).toBeVisible();
await expect(page.getByRole('button', { name: 'close' })).toBeVisible(); await expect(page.getByRole("button", { name: "close" })).toBeVisible();
}); });
test('Teacher can share a class by code', async ({ page }) => { test("Teacher can share a class by code", async ({ page }) => {
await page.goto("/") await page.goto("/");
// Login // Login
await page.getByRole("link", { name: "log in" }).click(); await page.getByRole("link", { name: "log in" }).click();
@ -42,20 +42,20 @@ test('Teacher can share a class by code', async ({ page }) => {
await page.getByRole("button", { name: "Sign In" }).click(); await page.getByRole("button", { name: "Sign In" }).click();
// Go to classes // Go to classes
await expect(page.getByRole('banner').getByRole('link', { name: 'Classes' })).toBeVisible(); await expect(page.getByRole("banner").getByRole("link", { name: "Classes" })).toBeVisible();
await page.getByRole('banner').getByRole('link', { name: 'Classes' }).click(); await page.getByRole("banner").getByRole("link", { name: "Classes" }).click();
await expect(page.getByRole('row', { name: 'class01' }).locator('i').nth(1)).toBeVisible(); await expect(page.getByRole("row", { name: "class01" }).locator("i").nth(1)).toBeVisible();
await page.getByRole('row', { name: 'class01' }).locator('i').nth(1).click(); await page.getByRole("row", { name: "class01" }).locator("i").nth(1).click();
await expect(page.getByRole('button').filter({ hasText: /^$/ }).nth(2)).toBeVisible(); await expect(page.getByRole("button").filter({ hasText: /^$/ }).nth(2)).toBeVisible();
await expect(page.getByRole('button').filter({ hasText: /^$/ }).nth(3)).toBeVisible(); await expect(page.getByRole("button").filter({ hasText: /^$/ }).nth(3)).toBeVisible();
await page.getByRole('button').filter({ hasText: /^$/ }).nth(3).click(); await page.getByRole("button").filter({ hasText: /^$/ }).nth(3).click();
await expect(page.getByText('copied!')).toBeVisible(); await expect(page.getByText("copied!")).toBeVisible();
await page.getByRole('button', { name: 'close' }).click(); await page.getByRole("button", { name: "close" }).click();
}); });
test("Student can join class by code", async ({ page }) => { test("Student can join class by code", async ({ page }) => {
await page.goto("/") await page.goto("/");
// Login // Login
await page.getByRole("link", { name: "log in" }).click(); await page.getByRole("link", { name: "log in" }).click();
@ -65,23 +65,23 @@ test("Student can join class by code", async ({ page }) => {
await page.getByRole("button", { name: "Sign In" }).click(); await page.getByRole("button", { name: "Sign In" }).click();
// Go to class // Go to class
await expect(page.getByRole('banner').getByRole('link', { name: 'Classes' })).toBeVisible(); await expect(page.getByRole("banner").getByRole("link", { name: "Classes" })).toBeVisible();
await page.getByRole('banner').getByRole('link', { name: 'Classes' }).click(); await page.getByRole("banner").getByRole("link", { name: "Classes" }).click();
// Check if the class page is visible // Check if the class page is visible
await expect(page.getByRole('heading', { name: 'Classes' })).toBeVisible(); await expect(page.getByRole("heading", { name: "Classes" })).toBeVisible();
await expect(page.getByRole('heading', { name: 'Join class' })).toBeVisible(); await expect(page.getByRole("heading", { name: "Join class" })).toBeVisible();
await expect(page.getByRole('textbox', { name: 'CODE CODE' })).toBeVisible(); await expect(page.getByRole("textbox", { name: "CODE CODE" })).toBeVisible();
await expect(page.getByRole('button', { name: 'submit' })).toBeVisible(); await expect(page.getByRole("button", { name: "submit" })).toBeVisible();
// Join a class // Join a class
await page.getByRole('textbox', { name: 'CODE CODE' }).click(); await page.getByRole("textbox", { name: "CODE CODE" }).click();
await page.getByRole('textbox', { name: 'CODE CODE' }).fill('X2J9QT'); await page.getByRole("textbox", { name: "CODE CODE" }).fill("X2J9QT");
await page.getByRole('button', { name: 'submit' }).click(); await page.getByRole("button", { name: "submit" }).click();
}); });
test('Teacher can remove student from class', async ({ page }) => { test("Teacher can remove student from class", async ({ page }) => {
await page.goto("/") await page.goto("/");
// Login // Login
await page.getByRole("link", { name: "log in" }).click(); await page.getByRole("link", { name: "log in" }).click();
@ -90,18 +90,18 @@ test('Teacher can remove student from class', async ({ page }) => {
await page.getByRole("textbox", { name: "Password" }).fill("password"); await page.getByRole("textbox", { name: "Password" }).fill("password");
await page.getByRole("button", { name: "Sign In" }).click(); await page.getByRole("button", { name: "Sign In" }).click();
await expect(page.getByRole('banner').getByRole('link', { name: 'Classes' })).toBeVisible(); await expect(page.getByRole("banner").getByRole("link", { name: "Classes" })).toBeVisible();
await page.getByRole('banner').getByRole('link', { name: 'Classes' }).click(); await page.getByRole("banner").getByRole("link", { name: "Classes" }).click();
await expect(page.getByRole('link', { name: 'class01' })).toBeVisible(); await expect(page.getByRole("link", { name: "class01" })).toBeVisible();
await expect(page.locator('#app')).toContainText('8'); await expect(page.locator("#app")).toContainText("8");
await page.getByRole('link', { name: 'class01' }).click(); await page.getByRole("link", { name: "class01" }).click();
await expect(page.getByRole('cell', { name: 'Kurt Cobain' })).toBeVisible(); await expect(page.getByRole("cell", { name: "Kurt Cobain" })).toBeVisible();
await expect(page.getByRole('row', { name: 'Kurt Cobain remove' }).getByRole('button')).toBeVisible(); await expect(page.getByRole("row", { name: "Kurt Cobain remove" }).getByRole("button")).toBeVisible();
await page.getByRole('row', { name: 'Kurt Cobain remove' }).getByRole('button').click(); await page.getByRole("row", { name: "Kurt Cobain remove" }).getByRole("button").click();
await expect(page.getByText('Are you sure?')).toBeVisible(); await expect(page.getByText("Are you sure?")).toBeVisible();
await expect(page.getByRole('button', { name: 'cancel' })).toBeVisible(); await expect(page.getByRole("button", { name: "cancel" })).toBeVisible();
await expect(page.getByRole('button', { name: 'yes' })).toBeVisible(); await expect(page.getByRole("button", { name: "yes" })).toBeVisible();
await page.getByRole('button', { name: 'yes' }).click(); await page.getByRole("button", { name: "yes" }).click();
await page.getByRole('banner').getByRole('link', { name: 'Classes' }).click(); await page.getByRole("banner").getByRole("link", { name: "Classes" }).click();
await expect(page.locator('#app')).toContainText('7'); await expect(page.locator("#app")).toContainText("7");
}); });