diff --git a/src/components/PageLayout/__test__/PageLayout.spec.tsx b/src/components/PageLayout/__test__/PageLayout.spec.tsx
index 569b2573..7f44bd1a 100644
--- a/src/components/PageLayout/__test__/PageLayout.spec.tsx
+++ b/src/components/PageLayout/__test__/PageLayout.spec.tsx
@@ -1,42 +1,47 @@
import React from "react";
import { render, screen } from "@testing-library/react";
import { PageLayout } from "..";
-import * as hooks from "../../../hooks"
+import * as hooks from "../../../hooks";
// Mocking the useDevice hook
jest.mock("../../../hooks", () => ({
- useDevice: jest.fn().mockReturnValue({isMobile:false}),
+ useDevice: jest.fn().mockReturnValue({ isMobile: false }),
}));
describe("PageLayout Component", () => {
- it("renders children correctly", () => {
- render(
-
- Content
-
- );
- const content =screen.getByText("Content")
- expect(content).toBeInTheDocument();
- });
+ it("renders children correctly", () => {
+ render(
+
+ Content
+ ,
+ );
+ const content = screen.getByText("Content");
+ expect(content).toBeInTheDocument();
+ });
- it("renders sidebar when provided and not on mobile", () => {
- const sidebar =
Sidebar
;
- render();
- const sidebarContent =screen.getByText("Sidebar")
- expect(sidebarContent).toBeInTheDocument();
- });
+ it("renders sidebar when provided and not on mobile", () => {
+ const sidebar = Sidebar
;
+ render();
+ const sidebarContent = screen.getByText("Sidebar");
+ expect(sidebarContent).toBeInTheDocument();
+ });
- it("does not render sidebar on mobile", () => {
- jest.spyOn(hooks,'useDevice').mockImplementation(()=>({isMobile:true, isDesktop:false, isTablet:false}))
- const sidebar = Sidebar
;
- render();
- const sidebarContent =screen.queryByText("Sidebar")
- expect(sidebarContent).not.toBeInTheDocument()
- });
+ it("does not render sidebar on mobile", () => {
+ jest.spyOn(hooks, "useDevice").mockImplementation(() => ({
+ isMobile: true,
+ isDesktop: false,
+ isTablet: false,
+ isTabletPortrait: false,
+ }));
+ const sidebar = Sidebar
;
+ render();
+ const sidebarContent = screen.queryByText("Sidebar");
+ expect(sidebarContent).not.toBeInTheDocument();
+ });
- it("does not render sidebar when not provided", () => {
- render();
- const sidebarContent=screen.queryByTestId("sidebar")
- expect(sidebarContent).toBeNull();
- });
+ it("does not render sidebar when not provided", () => {
+ render();
+ const sidebarContent = screen.queryByTestId("sidebar");
+ expect(sidebarContent).toBeNull();
+ });
});