Publish curated Knowledge Hub source from 2ed833f290b439a7bc91e5fd19b042c269e3bee9
This commit is contained in:
1 parent
10f2edcd29
commit
59f15b2d08
218 files changed
+23995
-1849
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { randomUUID } from "node:crypto";
|
||||
import AxeBuilder from "@axe-core/playwright";
|
||||
import { expect, test, type Page } from "@playwright/test";
|
||||
import { authenticatedStatePath } from "../global-setup";
|
||||
@@ -5,17 +6,17 @@ import { authenticatedStatePath } from "../global-setup";
|
||||
test.use({ storageState: authenticatedStatePath });
|
||||
|
||||
async function createProposal(page: Page): Promise<string> {
|
||||
return page.evaluate(async () => {
|
||||
return page.evaluate(async ({ idempotencyKey, correlationId }) => {
|
||||
const csrfResponse = await fetch("/api/v1/auth/csrf");
|
||||
const csrf = await csrfResponse.json() as { token: string; headerName: string };
|
||||
const response = await fetch("/api/v1/ingestion-proposals", {
|
||||
method: "POST",
|
||||
headers: { "content-type": "application/json", [csrf.headerName]: csrf.token, "Idempotency-Key": crypto.randomUUID() },
|
||||
body: JSON.stringify({ manifest: "# E2E mobiele beoordeling", correlationId: `e2e-review-${crypto.randomUUID()}` }),
|
||||
headers: { "content-type": "application/json", [csrf.headerName]: csrf.token, "Idempotency-Key": idempotencyKey },
|
||||
body: JSON.stringify({ manifest: "# E2E mobiele beoordeling", correlationId }),
|
||||
});
|
||||
if (!response.ok) throw new Error(`Voorstel maken mislukte (${response.status}): ${await response.text()}`);
|
||||
return (await response.json() as { id: string }).id;
|
||||
});
|
||||
}, { idempotencyKey: randomUUID(), correlationId: `e2e-review-${randomUUID()}` });
|
||||
}
|
||||
|
||||
test.describe("intakebeoordeling: responsieve, toegankelijke werkruimte", () => {
|
||||
|
||||
Reference in new issue
Block a user