mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
Adds a prefilled 'Request a tool' affordance to the home search empty state and beneath weak results. Opens the in-app feedback dialog with a new search_miss source and a structured search_query when analytics is on; links to a prefilled GitHub Discussions (Ideas) post when off, so a request is never silently dropped. Reuses the existing feedback pipe, dialog, and analytics gate; no new storage. i18n across all 21 locales.
13 lines
485 B
TypeScript
13 lines
485 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { promptVariantForSource, surveyIdForSource } from "@/lib/feedback";
|
|
|
|
describe("feedback search_miss mappings", () => {
|
|
it("maps the search_miss source to its survey id", () => {
|
|
expect(surveyIdForSource("search_miss")).toBe("search-miss-v1");
|
|
});
|
|
|
|
it("defaults the search_miss prompt variant to the empty-results entry point", () => {
|
|
expect(promptVariantForSource("search_miss")).toBe("search-empty-v1");
|
|
});
|
|
});
|