From 1e6511f92175f1974d8cd5b0f51950a1c5365182 Mon Sep 17 00:00:00 2001 From: pt2302 <1553279+pt2302@users.noreply.github.com> Date: Tue, 30 Jul 2024 11:03:39 -0400 Subject: [PATCH] Always enable publishing (#2258) * Always enable publishing * Update tests --- static/js/components/PublishDrawer.test.tsx | 4 ++-- static/js/components/PublishDrawer.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/static/js/components/PublishDrawer.test.tsx b/static/js/components/PublishDrawer.test.tsx index 0bd6df19c..edc087d46 100644 --- a/static/js/components/PublishDrawer.test.tsx +++ b/static/js/components/PublishDrawer.test.tsx @@ -186,12 +186,12 @@ describe("PublishDrawer", () => { expect(wrapper.find(".publish-option label").at(idx).text()).toBe(label) }) - it("disables the button if there is no unpublished content", async () => { + it("publish button is enabled even with no unpublished content", async () => { website[unpublishedField] = false const { wrapper } = await render() await simulateClickPublish(wrapper, action) wrapper.update() - expect(wrapper.find(".btn-publish").prop("disabled")).toBe(true) + expect(wrapper.find(".btn-publish").prop("disabled")).toBe(false) }) it("render only the preview button if user is not an admin", async () => { diff --git a/static/js/components/PublishDrawer.tsx b/static/js/components/PublishDrawer.tsx index 04c28ddd6..d4c69d7b1 100644 --- a/static/js/components/PublishDrawer.tsx +++ b/static/js/components/PublishDrawer.tsx @@ -123,7 +123,7 @@ const PublishingOption: React.FC = (props) => { )}