videogen/apps/web/app/(marketing)/hero-wedge.test.ts
caelum0x d56639a594
Some checks failed
build-images / web (push) Has been cancelled
vision2026-ci / Python SDK resource tests (push) Has been cancelled
build-images / api (push) Has been cancelled
build-images / worker-gpu (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (comfy-workflow-schema) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (effects-core) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (eventbus-types) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (growth-analytics) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (provider-adapter-kit) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (publishing-connectors) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (render-core) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (shot-template-schema) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (trends-schema) (push) Has been cancelled
vision2026-ci / Desktop engine crates (test + clippy + fmt) (push) Has been cancelled
codeql / Analyze (javascript-typescript) (push) Has been cancelled
codeql / Analyze (python) (push) Has been cancelled
perf / API hot-path micro-smoke (budgeted) (push) Has been cancelled
perf / Desktop engine crates (release build check) (push) Has been cancelled
vision2026-ci / API phase modules (ruff + pytest) (push) Has been cancelled
vision2026-ci / Alembic upgrade + drift check (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (caption-engine) (push) Has been cancelled
Menivor — open source release (MIT), free to use and fork
Paid, hosted product at menivor.com, now retired as a company project.
Fresh squashed history of the cleaned working tree (secret-scanned,
no .env, no customer data, no outreach logs). Built on
MoneyPrinterTurbo (MIT, harry0703) — see NOTICE.
2026-12-04 02:10:26 +03:00

50 lines
2.4 KiB
TypeScript

/**
* The landing hero leads with the narrowest wedge the capture pipeline ships
* end to end: paste an App Store (or Play Store) link, get a rendered
* vertical demo back (see `app/domains/capture/sources.py` + `store.py` +
* `slideshow.py` on the API, and `link-kind.ts` on the web, which already
* classifies `apps.apple.com`/`itunes.apple.com` as `app_store`). This test
* pins the hero copy to that wedge and to the live `offerFor(posture.freeFirstReel)`
* copy (the API's own `/launch/status` truth, not the web build's
* `NEXT_PUBLIC_MENIVOR_FREE_FIRST_REEL` guess) so the page never claims a
* free reel the API is not actually granting.
*/
import * as fs from "node:fs";
import * as path from "node:path";
import { describe, expect, it } from "vitest";
const HERO = fs.readFileSync(path.join(__dirname, "_components/OneFlowHero.tsx"), "utf8");
const INPUT = fs.readFileSync(path.join(__dirname, "_components/HeroLinkInput.tsx"), "utf8");
describe("landing hero: solo-SaaS-founder release-video wedge", () => {
it("headline leads with the ship-but-never-post release-video job", () => {
expect(HERO).toMatch(/You ship\. You never post about it\./i);
expect(HERO).toMatch(/what's new.{0,60}video/i);
});
it("still names Play Store, a site, and a screen recording as the same flow", () => {
expect(HERO).toMatch(/Google Play link/i);
expect(HERO).toMatch(/screen recording/i);
});
it("the free-reel line reads the live offerFor(posture.freeFirstReel) copy, not a hardcoded claim", () => {
expect(HERO).toMatch(/import \{ offerFor \} from "@\/lib\/offer"/);
expect(HERO).toMatch(/offerFor\(posture\.freeFirstReel\)/);
expect(HERO).toMatch(/\{offer\.homepage\}/);
expect(HERO).not.toMatch(/\{OFFER\.homepage\}/);
expect(HERO).not.toMatch(/\{offer\.short\}/);
expect(HERO).not.toMatch(/landing\.signupNote/);
});
it("only shows the free-reel claim in public posture (never on the waitlist form)", () => {
expect(HERO).toMatch(/posture\.mode === "public" && \(\s*<p[^>]*>\{offer\.homepage\}/);
const waitlist = HERO.slice(HERO.indexOf("posture.mode === \"waitlist\""), HERO.indexOf(": posture.mode === \"public\""));
expect(waitlist).not.toMatch(/offer\.homepage/);
});
it("the paste box placeholder mentions an App Store link but still accepts any link", () => {
expect(INPUT).toMatch(/App Store link/i);
expect(INPUT).toMatch(/any other link|type a topic/i);
});
});