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
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:
@@ -82,7 +82,10 @@ describe('Admin new group page – unsaved-changes guard', () => {
|
|||||||
await expect.element(page.getByText(/ungespeicherte Änderungen/i)).toBeInTheDocument();
|
await expect.element(page.getByText(/ungespeicherte Änderungen/i)).toBeInTheDocument();
|
||||||
|
|
||||||
type SubmitFn = () => Promise<
|
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)();
|
const innerFn = await (enhanceCaptureRef.submitFn as SubmitFn)();
|
||||||
await innerFn({
|
await innerFn({
|
||||||
@@ -109,7 +112,10 @@ describe('Admin new group page – unsaved-changes guard', () => {
|
|||||||
await expect.element(page.getByText(/ungespeicherte Änderungen/i)).toBeInTheDocument();
|
await expect.element(page.getByText(/ungespeicherte Änderungen/i)).toBeInTheDocument();
|
||||||
|
|
||||||
type SubmitFn = () => Promise<
|
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)();
|
const innerFn = await (enhanceCaptureRef.submitFn as SubmitFn)();
|
||||||
await innerFn({
|
await innerFn({
|
||||||
|
|||||||
@@ -142,7 +142,10 @@ describe('Admin new user page – unsaved-changes guard', () => {
|
|||||||
await expect.element(page.getByText(/ungespeicherte Änderungen/i)).toBeInTheDocument();
|
await expect.element(page.getByText(/ungespeicherte Änderungen/i)).toBeInTheDocument();
|
||||||
|
|
||||||
type SubmitFn = () => Promise<
|
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)();
|
const innerFn = await (enhanceCaptureRef.submitFn as SubmitFn)();
|
||||||
await innerFn({
|
await innerFn({
|
||||||
@@ -169,7 +172,10 @@ describe('Admin new user page – unsaved-changes guard', () => {
|
|||||||
await expect.element(page.getByText(/ungespeicherte Änderungen/i)).toBeInTheDocument();
|
await expect.element(page.getByText(/ungespeicherte Änderungen/i)).toBeInTheDocument();
|
||||||
|
|
||||||
type SubmitFn = () => Promise<
|
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)();
|
const innerFn = await (enhanceCaptureRef.submitFn as SubmitFn)();
|
||||||
await innerFn({
|
await innerFn({
|
||||||
|
|||||||
Reference in New Issue
Block a user