Update tests for categories

This commit is contained in:
thiloho
2024-09-20 18:19:54 +02:00
parent c11d73c328
commit 1e9f076bc7
3 changed files with 15 additions and 9 deletions

View File

@@ -91,7 +91,13 @@
<label>
Name:
<input type="text" name="category-name" value={category_name} maxlength="50" required />
<input
type="text"
name="category-name"
value={category_name}
maxlength="50"
required
/>
</label>
<label>

View File

@@ -86,8 +86,8 @@ test.describe.serial("Collaborator tests", () => {
await page.getByRole("link", { name: "Documentation" }).click();
await page.getByRole("link", { name: "Categories" }).click();
await page.getByRole("button", { name: "Create category" }).click();
await page.getByLabel("Name:").click();
await page.getByLabel("Name:").fill("Category-10");
await page.getByLabel("Name:").nth(0).click();
await page.getByLabel("Name:").nth(0).fill("Category-10");
await page.getByLabel("Weight:").click();
await page.getByLabel("Weight:").fill("10");
await page.getByRole("button", { name: "Submit" }).click();
@@ -370,8 +370,8 @@ test.describe.serial("Collaborator tests", () => {
await page.getByRole("link", { name: "Documentation" }).click();
await page.getByRole("link", { name: "Categories" }).click();
await page.getByRole("button", { name: "Create category" }).click();
await page.getByLabel("Name:").click();
await page.getByLabel("Name:").fill(`Category-${permissionLevel}`);
await page.getByLabel("Name:").nth(0).click();
await page.getByLabel("Name:").nth(0).fill(`Category-${permissionLevel}`);
await page.getByRole("spinbutton", { name: "Weight:" }).click();
await page.getByRole("spinbutton", { name: "Weight:" }).fill(permissionLevel.toString());
await page.getByRole("button", { name: "Submit" }).click();

View File

@@ -261,8 +261,8 @@ test.describe.serial("Website tests", () => {
await page.getByRole("link", { name: "Documentation" }).click();
await page.getByRole("link", { name: "Categories" }).click();
await page.getByRole("button", { name: "Create category" }).click();
await page.getByLabel("Name:").click();
await page.getByLabel("Name:").fill("Category");
await page.getByLabel("Name:").nth(0).click();
await page.getByLabel("Name:").nth(0).fill("Category");
await page.getByLabel("Weight:").click();
await page.getByLabel("Weight:").fill("1000");
await page.getByRole("button", { name: "Submit" }).click();
@@ -294,8 +294,8 @@ test.describe.serial("Website tests", () => {
await page.getByRole("link", { name: "Documentation" }).click();
await page.getByRole("link", { name: "Categories" }).click();
await page.getByRole("button", { name: "Create category" }).click();
await page.getByLabel("Name:").click();
await page.getByLabel("Name:").fill("Category");
await page.getByLabel("Name:").nth(0).click();
await page.getByLabel("Name:").nth(0).fill("Category");
await page.getByLabel("Weight:").click();
await page.getByLabel("Weight:").fill("1000");
await page.getByRole("button", { name: "Submit" }).click();