feat(plans): publish honest Free and Pro
CI and Deploy / test (pull_request) Successful in 5m6s
CI and Deploy / deploy (pull_request) Has been skipped

This commit is contained in:
cesnimda
2026-08-15 18:04:18 +02:00
parent a7c25499bb
commit a25c31b93a
26 changed files with 403 additions and 93 deletions
@@ -0,0 +1,27 @@
import React from "react";
import "@testing-library/jest-dom";
import { fireEvent, render, screen } from "@testing-library/react";
import ProFeatureNotice from "./components/ProFeatureNotice";
beforeEach(() => window.sessionStorage.clear());
test("shows a respectful upgrade action and remembers dismissal for the session", () => {
const { unmount } = render(
<ProFeatureNotice featureKey="test-feature" title="Draft faster with Pro.">
Existing content stays editable.
</ProFeatureNotice>,
);
expect(screen.getByRole("link", { name: "View Pro" })).toHaveAttribute("href", "/settings");
fireEvent.click(screen.getByRole("button", { name: "Dismiss Draft faster with Pro." }));
expect(screen.queryByText("Draft faster with Pro.")).not.toBeInTheDocument();
unmount();
render(
<ProFeatureNotice featureKey="test-feature" title="Draft faster with Pro.">
Existing content stays editable.
</ProFeatureNotice>,
);
expect(screen.queryByText("Draft faster with Pro.")).not.toBeInTheDocument();
});