Expand homepage browser coverage beyond the document title

Aperta Adatta ai principianti
#349 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@xlc ci sta già lavorando.

Dal 15/10/2026.

  • #388 di @xlc — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
88/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
testing-qa

Direzione di ricerca

Inizia da src/tests/e2e/home.spec.ts, quindi esamina src/app/page.tsx e src/components/form.tsx per identificare il titolo renderizzato, i controlli del modulo accessibili, il comportamento del toast e i link principali. Aggiorna solo il test E2E della homepage, mantenendo l’asserzione del titolo del documento. Il lavoro è completato quando le asserzioni semantiche coprono il titolo visibile, il controllo di input accessibile e il controllo di invio, oltre ai link principali previsti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Task

Expand the homepage browser test with semantic assertions for the rendered headline, demo form, and primary links.

Context

The staging task-discovery review found that src/__tests__/e2e/home.spec.ts only asserts the document title, while src/app/page.tsx and src/components/form.tsx render the core headline, name input, submit control, toast behavior, and primary links.

Discovery report task-discovery-b8a8d41f-6598-45f5-8609-de35e88b9693 identified this open issue as the exact existing match. Continue this issue rather than creating a duplicate.

The subsequent discovery report task-discovery-2e9c1f39-93c9-42cf-9466-ec103ef8d13b also confirmed this issue as the matching open task. This publication update uses that report's completed repository inspection; it does not claim a new source inspection or test execution.

Confirmed source evidence

Previously recorded source inspection against main at commit 6b5e541f090e591b3faa3b46f6d0b764d3aa54e6:

Additional confirmed evidence from report task-discovery-2e9c1f39-93c9-42cf-9466-ec103ef8d13b:

  • Complete inspection of src/__tests__/e2e/home.spec.ts, lines 3–7, confirms the browser test currently navigates to / and checks only the document title.
  • Complete inspection of src/app/page.tsx, lines 8–33, and src/components/form.tsx, lines 36–63, confirms the localized heading, demo form input and submit control, and both primary links are rendered but lack assertions in that test.
  • Duplicate decision: continue open #349 rather than creating another homepage coverage issue. The report's issue-body excerpt was truncated; the full body was read for this publication update.

Scope

  • Preserve the existing document-title assertion.
  • Assert the visible homepage headline and the demo form's accessible input and submit control.
  • Assert both expected primary links using semantic locators rather than brittle CSS or DOM structure.

Acceptance criteria

  • The existing document-title assertion remains in place.
  • The homepage E2E test verifies the visible localized headline using a semantic heading locator.
  • It verifies the demo form's input and localized submit control using accessible, user-facing locators appropriate to the existing markup and localized input placeholder.
  • It verifies both primary links using semantic link locators and their expected destinations: the starter's getting-started documentation and GitHub repository.
  • Assertions do not depend on CSS classes, incidental DOM nesting, or styling.

Implementation Surface

  • Inspect: src/__tests__/e2e/home.spec.ts, src/app/page.tsx, src/components/form.tsx, src/messages/en.json, playwright.config.ts.
  • Update: src/__tests__/e2e/home.spec.ts.
  • Public contracts affected: none.

Verification guidance

  • With the repository's normal dependencies and environment configured, run npm run e2e -- src/__tests__/e2e/home.spec.ts.
  • Run the focused test across all configured browser projects: Chromium, Firefox, and WebKit (playwright.config.ts, lines 33–48); do not restrict validation to a single project.
  • Run the configured E2E suite with npm run e2e to check for locator or rendering regressions.
  • Review locator choices for accessible semantics and localization-aware expectations rather than brittle structure/style matching.
  • Record focused-test and configured-suite results when implementing; this issue update is evidence gathering and planning, not a test execution result.

Out of scope

  • Repository selection, authentication changes, new homepage behavior, or unrelated visual redesign.
Lingua principale
TypeScript
Stelle
0
Fork
0
Merge medio
12m
PR unite (30g)
6

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di polka-codes/test

Tutte le issue di polka-codes/test

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.