fix(test): allow extra result properties in enhance callback type
Some checks failed
CI / Unit & Component Tests (pull_request) Successful in 3m8s
CI / OCR Service Tests (pull_request) Successful in 17s
CI / fail2ban Regex (pull_request) Successful in 48s
CI / Compose Bucket Idempotency (pull_request) Successful in 58s
CI / Backend Unit Tests (pull_request) Failing after 17m19s

Use [key: string]: unknown index signature so TS does not reject the
extra fields (location, status) passed to the redirect/failure result
in the spec helpers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-05-14 11:58:19 +02:00
committed by marcel
parent ffcb901376
commit 6fffc06c28
2 changed files with 16 additions and 4 deletions

View File

@@ -82,7 +82,10 @@ describe('Admin new group page unsaved-changes guard', () => {
await expect.element(page.getByText(/ungespeicherte Änderungen/i)).toBeInTheDocument();
type SubmitFn = () => Promise<
(opts: { result: { type: string }; update: () => Promise<void> }) => Promise<void>
(opts: {
result: { type: string; [key: string]: unknown };
update: () => Promise<void>;
}) => Promise<void>
>;
const innerFn = await (enhanceCaptureRef.submitFn as SubmitFn)();
await innerFn({
@@ -109,7 +112,10 @@ describe('Admin new group page unsaved-changes guard', () => {
await expect.element(page.getByText(/ungespeicherte Änderungen/i)).toBeInTheDocument();
type SubmitFn = () => Promise<
(opts: { result: { type: string }; update: () => Promise<void> }) => Promise<void>
(opts: {
result: { type: string; [key: string]: unknown };
update: () => Promise<void>;
}) => Promise<void>
>;
const innerFn = await (enhanceCaptureRef.submitFn as SubmitFn)();
await innerFn({

View File

@@ -142,7 +142,10 @@ describe('Admin new user page unsaved-changes guard', () => {
await expect.element(page.getByText(/ungespeicherte Änderungen/i)).toBeInTheDocument();
type SubmitFn = () => Promise<
(opts: { result: { type: string }; update: () => Promise<void> }) => Promise<void>
(opts: {
result: { type: string; [key: string]: unknown };
update: () => Promise<void>;
}) => Promise<void>
>;
const innerFn = await (enhanceCaptureRef.submitFn as SubmitFn)();
await innerFn({
@@ -169,7 +172,10 @@ describe('Admin new user page unsaved-changes guard', () => {
await expect.element(page.getByText(/ungespeicherte Änderungen/i)).toBeInTheDocument();
type SubmitFn = () => Promise<
(opts: { result: { type: string }; update: () => Promise<void> }) => Promise<void>
(opts: {
result: { type: string; [key: string]: unknown };
update: () => Promise<void>;
}) => Promise<void>
>;
const innerFn = await (enhanceCaptureRef.submitFn as SubmitFn)();
await innerFn({