From 6183669c9b2c00f5033b0ec37c2f199e1fb9409f Mon Sep 17 00:00:00 2001 From: Aleksandr Gumroian Date: Wed, 28 Dec 2022 15:19:24 +0100 Subject: [PATCH] Fix CustomizationContextMock for tests --- src/testUtils/customTestRender.js | 8 ++++---- src/testUtils/cutomizationContextMock.js | 17 ++++++++++++++--- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/testUtils/customTestRender.js b/src/testUtils/customTestRender.js index c256358..87166c5 100644 --- a/src/testUtils/customTestRender.js +++ b/src/testUtils/customTestRender.js @@ -25,13 +25,13 @@ Wrapper.propTypes = { function Wrapper({ children }) { return ( - - + + {children} - - + + ); } diff --git a/src/testUtils/cutomizationContextMock.js b/src/testUtils/cutomizationContextMock.js index 8a0293b..71191ef 100644 --- a/src/testUtils/cutomizationContextMock.js +++ b/src/testUtils/cutomizationContextMock.js @@ -9,12 +9,23 @@ import React from "react"; window.CustomizationContext = React.createContext(); -const deviceDetails = {}; -const isCustomized = jest.fn(); +const deviceDetails = { + kernel: "5.x.x", + model: "Turris Omnia", + os_branch: { + mode: "branch", + value: "hbs", + }, + os_version: "6.x.x", + reforis_version: "1.x.x", + serial: 123456789, +}; + +const isCustomized = false; function CustomizationContextMock({ children }) { return ( - + {children} );