diff --git a/editor.planx.uk/src/@planx/components/FileUploadAndLabel/Public.test.tsx b/editor.planx.uk/src/@planx/components/FileUploadAndLabel/Public.test.tsx
index 82d5b3cd2b..83d0ee3585 100644
--- a/editor.planx.uk/src/@planx/components/FileUploadAndLabel/Public.test.tsx
+++ b/editor.planx.uk/src/@planx/components/FileUploadAndLabel/Public.test.tsx
@@ -1,8 +1,7 @@
import { act, screen, waitFor, within } from "@testing-library/react";
import { UserEvent } from "@testing-library/user-event/dist/types/setup/setup";
import axios from "axios";
-import { useStore } from "pages/FlowEditor/lib/store";
-import { FullStore } from "pages/FlowEditor/lib/store";
+import { FullStore, useStore } from "pages/FlowEditor/lib/store";
import React from "react";
import { setup } from "testUtils";
import { Breadcrumbs } from "types";
@@ -60,6 +59,18 @@ describe("Basic state and setup", () => {
expect(results).toHaveNoViolations();
});
+ it("does not show a print button if hideDropZone is false", async () => {
+ const { queryByText } = setup(
+ ,
+ );
+ const printButton = queryByText("Print this page");
+ expect(printButton).toBeNull();
+ });
+
test("shows help buttons for header and applicable file", async () => {
const { getAllByTestId } = setup(
{
expect(results).toHaveNoViolations();
});
+ it("shows a print button", async () => {
+ const { getByText } = setup(
+ ,
+ );
+ expect(getByText("Print this page")).toBeVisible();
+ });
+
test("shows help buttons for header and applicable file", async () => {
const { getAllByTestId } = setup(
+ {props.hideDropZone && (
+ }
+ size="large"
+ onClick={() => window.print()}
+ >
+ Print this page
+
+ )}
);
}