import { Then } from "@badeball/cypress-cucumber-preprocessor"; // Landing-page-specific steps. Everything else this feature needs // (signing in / not, visiting a path, URL and heading assertions) comes // from the shared `cypress/support/step_definitions/common.steps.ts`. // Mocks nothing itself — the landing page makes no API calls of its own; // it renders purely from the logged-out state `I am not signed in` sets up. Then("I should see the landing call to action", () => { cy.get(".landing__hero .landing__cta--primary") .should("be.visible") .and("have.attr", "href", "/signup"); cy.get(".landing__hero .landing__cta--secondary") .should("be.visible") .and("have.attr", "href", "/login"); }); // The Android build is distributed as a Forgejo release asset with a stable // filename (issue #64 builds/attaches it). Points at this API's own // `/mobile/download` (a plain server-side redirect to the actual latest // `.apk`) rather than a Forgejo URL directly: Forgejo has neither a // GitHub-style `/releases/latest/download/` shortcut nor CORS headers // on its Releases API, so resolving the real asset URL client-side isn't // possible either way (both verified live). `VITE_API_URL` is unset in this // environment, so `API_BASE_URL` (see `api/client.ts`) is `""` — same // origin, hence the bare `/mobile/download` path here rather than an // absolute URL. We only assert the link is there and points at the right // path — the redirect target itself is external to the suite. Then("I should see the Android download link", () => { cy.get(".landing__hero .landing__mobile-link") .should("be.visible") .and("have.attr", "href", "/mobile/download"); });