Call the last create-flow action Publish so it reads as putting a rule on the web, not locking it forever.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -84,7 +84,7 @@ describe("CompletedScreen", () => {
|
||||
expect(screen.getByText("Fixture value title")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("does not show post-finalize toast without celebrate query", () => {
|
||||
it("does not show post-publish toast without celebrate query", () => {
|
||||
render(<CompletedScreen />);
|
||||
expect(
|
||||
screen.queryByText(
|
||||
@@ -98,7 +98,7 @@ describe("CompletedScreen", () => {
|
||||
).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("shows post-finalize toast in status region when celebrate query is set", () => {
|
||||
it("shows post-publish toast in status region when celebrate query is set", () => {
|
||||
mockSearchParams({
|
||||
[CREATE_FLOW_COMPLETED_CELEBRATE_QUERY]:
|
||||
CREATE_FLOW_COMPLETED_CELEBRATE_VALUE,
|
||||
|
||||
@@ -79,7 +79,7 @@ describe("FinalReviewScreen", () => {
|
||||
render(<FinalReviewScreen />);
|
||||
expect(
|
||||
screen.getByText(
|
||||
/Here's what other people will see. Make sure everything looks good before you finalize everything. Once the rule is finalized, you must use one of your decision-making mechanisms to edit it again./i,
|
||||
/Here's what other people will see. Make sure everything looks good before you publish. Once the rule is published, you must use one of your decision-making mechanisms to edit it again./i,
|
||||
),
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
@@ -1004,6 +1004,18 @@ function FinalReviewEditPublishedWithStateProbe({
|
||||
}
|
||||
|
||||
describe("FinalReviewScreen — edit published title and description", () => {
|
||||
it("renders edit-published lockup copy", () => {
|
||||
render(<FinalReviewScreen variant="editPublished" />);
|
||||
expect(
|
||||
screen.getByRole("heading", { name: "Edit your CommunityRule" }),
|
||||
).toBeInTheDocument();
|
||||
expect(
|
||||
screen.getByText(
|
||||
/Update what others see on your public rule. Save & Exit or Publish applies changes to your published CommunityRule./i,
|
||||
),
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("does not expose click-to-edit title or description on default final review", () => {
|
||||
render(
|
||||
<FinalReviewWithFlowState
|
||||
|
||||
@@ -19,4 +19,10 @@ describe("create footer messages", () => {
|
||||
it("exposes confirmMembers for the community-size footer CTA", () => {
|
||||
expect(messages.create.footer.confirmMembers).toBe("Confirm members");
|
||||
});
|
||||
|
||||
it("exposes publishCommunityRule for the final-review footer CTA", () => {
|
||||
expect(messages.create.footer.publishCommunityRule).toBe(
|
||||
"Publish CommunityRule",
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -258,7 +258,7 @@ describe("useCreateFlowFinalize", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("does not PATCH when a guest finalizes an already-published rule", async () => {
|
||||
it("does not PATCH when a guest publishes an already-published rule", async () => {
|
||||
const { result } = renderHook(() =>
|
||||
useCreateFlowFinalize({
|
||||
state: {
|
||||
|
||||
Reference in New Issue
Block a user