mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
feat: pipeline templates, analytics opt-out, 83 conversion presets, positioning + e2e modernization
Lands five integrated branches: pipeline templates (#355), analytics opt-out (#354), 83 conversion presets bringing the catalog to 240 tools (#356), self-hosted positioning (#353), and e2e modernization (#351). Integration fixes: aligned stale web analytics tests with the opt-out/allow-list model, closed 3 CodeQL incomplete-sanitization alerts in the i18n generator, resolved settings/index/docs/format-matrix conflicts, and corrected tool counts to 240.
This commit is contained in:
@@ -2732,10 +2732,16 @@ describe("useAnalyticsStore", () => {
|
||||
expect(s.configLoaded).toBe(true);
|
||||
});
|
||||
|
||||
it("fetchConfig skips when already loaded", async () => {
|
||||
it("fetchConfig refetches even when already loaded so opt-out converges", async () => {
|
||||
useAnalyticsStore.setState({ configLoaded: true });
|
||||
fetchMock.mockResolvedValueOnce({
|
||||
ok: true,
|
||||
json: () => Promise.resolve({ enabled: false }),
|
||||
});
|
||||
await useAnalyticsStore.getState().fetchConfig();
|
||||
expect(fetchMock).not.toHaveBeenCalled();
|
||||
// No one-shot guard: an already-open tab must pick up an instance-wide opt-out.
|
||||
expect(fetchMock).toHaveBeenCalledWith("/api/v1/config/analytics");
|
||||
expect(useAnalyticsStore.getState().config).toEqual({ enabled: false });
|
||||
});
|
||||
|
||||
it("fetchConfig sets configLoaded=true on error", async () => {
|
||||
|
||||
Reference in New Issue
Block a user