From 95f5372d597fefa512adb09505e65e50edd924dc Mon Sep 17 00:00:00 2001 From: RiccardoMolinari95 Date: Wed, 8 Jan 2025 10:22:06 +0100 Subject: [PATCH] test: fix ItwIdentificationModeSelectionScreen test --- ...IdentificationModeSelectionScreen.test.tsx | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/ts/features/itwallet/identification/screens/__tests__/ItwIdentificationModeSelectionScreen.test.tsx b/ts/features/itwallet/identification/screens/__tests__/ItwIdentificationModeSelectionScreen.test.tsx index 6ed8b90582c..034f14af4e2 100644 --- a/ts/features/itwallet/identification/screens/__tests__/ItwIdentificationModeSelectionScreen.test.tsx +++ b/ts/features/itwallet/identification/screens/__tests__/ItwIdentificationModeSelectionScreen.test.tsx @@ -15,6 +15,8 @@ import { ItwEidIssuanceMachineContext } from "../../../machine/provider"; import { itwEidIssuanceMachine } from "../../../machine/eid/machine"; import { ItwLifecycleState } from "../../../lifecycle/store/reducers"; import { ToolEnum } from "../../../../../../definitions/content/AssistanceToolConfig"; +import { IOStackNavigationProp } from "../../../../../navigation/params/AppParamsList"; +import { ItwParamsList } from "../../../navigation/ItwParamsList"; jest.mock("../../../../../config", () => ({ itwEnabled: true @@ -128,10 +130,29 @@ describe("ItwIdentificationModeSelectionScreen", () => { } }); + const mockNavigation = new Proxy( + {}, + { + get: (_, prop) => jest.fn() + } + ) as unknown as IOStackNavigationProp< + ItwParamsList, + "ITW_IDENTIFICATION_MODE_SELECTION" + >; + + const route = { + key: "ITW_IDENTIFICATION_MODE_SELECTION", + name: ITW_ROUTES.IDENTIFICATION.MODE_SELECTION, + params: {} + }; + return renderScreenWithNavigationStoreContext( () => ( - + ), ITW_ROUTES.IDENTIFICATION.MODE_SELECTION,