batchCooking/apps/web/cypress/e2e/landing.ts
Nicolas 503781c95f
Some checks failed
CI / lint (push) Successful in 5m4s
CI / build (push) Successful in 3m38s
CI / intent-service-test (push) Successful in 6m41s
CI / test (push) Failing after 11m29s
CI / e2e (push) Successful in 14m56s
feat(landing): lien de téléchargement de l'app Android (#65)
Sur la page vitrine `/`, sous la rangée de CTA du hero (pas un 3e bouton :
un compte reste nécessaire quelle que soit la plateforme), un lien discret
vers l'APK Android + une ligne d'aide.

- Cible : l'asset `batchcooking.apk` de la dernière release taguée Forgejo
  (`/releases/latest/download/…`, nom de fichier stable) — pas un artefact
  de CI. 404 tant que #64 + la correction de release.yml ne sont pas faits :
  état transitoire assumé, ce ticket n'ajoute que le lien.
- `mobileHint` : rappel honnête que c'est un .apk à sideloader, pas une
  distribution Play Store.
- i18n `landing.hero.mobileDownload` / `mobileHint` ; style discret dans
  landing-page.scss ; scénario Cypress de plus (présence + href du lien).

Vérifs : `pnpm build` + `pnpm lint` OK. `landing.feature` non lancé en
local (le hoist `tslib` de `@cypress/vite-dev-server` dans ce node_modules
est cassé par un `pnpm install --force` interrompu + un verrou concurrent
sur `@esbuild/win32-x64` ; `pnpm-lock.yaml` inchangé, la CI n'est pas
affectée) → couvert par le job `e2e` de la CI.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-06 10:26:50 +02:00

29 lines
1.2 KiB
TypeScript

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). We only assert the link is there
// and points at the right URL — the file 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",
"https://git.dev.kyuno.fr/kyuno/batchCooking/releases/latest/download/batchcooking.apk",
);
});