Run specific test suites in serial matter and restrict file uploads

This commit is contained in:
thiloho
2024-09-01 16:51:21 +02:00
parent 8deefc41d1
commit 49c5b2a541
5 changed files with 109 additions and 10 deletions

3
web-app/.gitignore vendored
View File

@@ -19,3 +19,6 @@ Thumbs.db
# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
# Playwright
test-results

View File

@@ -77,9 +77,19 @@
<label>
Filter:
<select name="website_filter">
<option value="all">Show all</option>
<option value="creations">Created by you</option>
<option value="shared">Shared with you</option>
<option value="all" selected={"all" === $page.url.searchParams.get("website_filter")}
>Show all</option
>
<option
value="creations"
selected={"creations" === $page.url.searchParams.get("website_filter")}
>Created by you</option
>
<option
value="shared"
selected={"shared" === $page.url.searchParams.get("website_filter")}
>Shared with you</option
>
</select>
</label>
<button type="submit">Submit</button>

View File

@@ -66,9 +66,19 @@
<label>
Filter:
<select name="article_filter">
<option value="all">Show all</option>
<option value="creations">Created by you</option>
<option value="shared">Created by others</option>
<option value="all" selected={"all" === $page.url.searchParams.get("article_filter")}
>Show all</option
>
<option
value="creations"
selected={"creations" === $page.url.searchParams.get("article_filter")}
>Created by you</option
>
<option
value="shared"
selected={"shared" === $page.url.searchParams.get("article_filter")}
>Created by others</option
>
</select>
</label>
<button type="submit">Submit</button>

View File

@@ -125,7 +125,7 @@ test.describe("Blog", () => {
});
});
test.describe("Articles", () => {
test.describe.serial("Articles", () => {
test("Create article", async ({ authenticatedPage: page }) => {
await page.getByRole("link", { name: "Blog" }).click();
await page.getByRole("link", { name: "Articles" }).click();
@@ -171,7 +171,7 @@ test.describe("Blog", () => {
});
});
test.describe("Collaborators", () => {
test.describe.serial("Collaborators", () => {
test("Add collaborator", async ({ authenticatedPage: page }) => {
await page.getByRole("link", { name: "Blog" }).click();
await page.getByRole("link", { name: "Collaborators" }).click();
@@ -202,7 +202,7 @@ test.describe("Blog", () => {
});
test.describe("Docs", () => {
test.describe("Categories", () => {
test.describe.serial("Categories", () => {
test("Create category", async ({ authenticatedPage: page }) => {
await page.getByRole("link", { name: "Documentation" }).click();
await page.getByRole("link", { name: "Categories" }).click();
@@ -299,7 +299,7 @@ test("Delete websites", async ({ authenticatedPage: page }) => {
await expect(page.getByRole("link", { name: "All websites" })).toBeHidden();
});
test("Delete account", async ({ authenticatedPage: page }) => {
test("Delete accounts", async ({ authenticatedPage: page }) => {
await page.getByRole("link", { name: "Account" }).click();
await page.getByRole("button", { name: "Delete account" }).click();
await page.getByLabel("Password:").click();