Skip to content

Commit

Permalink
Always enable publishing (#2258)
Browse files Browse the repository at this point in the history
* Always enable publishing

* Update tests
  • Loading branch information
pt2302 authored Jul 30, 2024
1 parent cc95720 commit 1e6511f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions static/js/components/PublishDrawer.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
2 changes: 1 addition & 1 deletion static/js/components/PublishDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const PublishingOption: React.FC<PublishingOptionProps> = (props) => {
)}
<PublishForm
onSubmit={handlePublish}
disabled={!publishingInfo.hasUnpublishedChanges}
disabled={false} //publishing is always enabled
website={website}
option={publishingEnv}
/>
Expand Down

0 comments on commit 1e6511f

Please sign in to comment.