mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix(analytics): harden analytics opt-out and feedback surfaces (#423)
Server stops phoning Sentry home after opt-out (release-health sessions + client reports off); settings saves diff-send only changed keys so a stale tab cannot revert an instance-wide opt-out; disabling analytics hides the feedback UI immediately; optIn resumes PostHog after re-enable; onboarding survey writes time out at 15s; inline tool-feedback prompt arms a shown-cooldown.
This commit is contained in:
@@ -139,6 +139,17 @@ describe("ToolFeedbackPrompt", () => {
|
||||
expect(screen.getByText("How did this tool work?")).toBeDefined();
|
||||
});
|
||||
|
||||
it("stops nagging on the next result once shown, even without interaction", () => {
|
||||
const { unmount } = render(<ToolFeedbackPrompt toolId="resize" />);
|
||||
expect(screen.getByText("How did this tool work?")).toBeDefined();
|
||||
unmount();
|
||||
|
||||
// A different tool finishes moments later. The user never touched the first
|
||||
// prompt, but it must not reappear on the very next result.
|
||||
render(<ToolFeedbackPrompt toolId="convert" />);
|
||||
expect(screen.queryByText("How did this tool work?")).toBeNull();
|
||||
});
|
||||
|
||||
it("supports Don't ask again suppression", () => {
|
||||
const { unmount } = render(<ToolFeedbackPrompt toolId="resize" />);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user