E2E coverage for the trace search RED metrics view

Aperta
#3,176 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
70/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
clickhouse, react, typescript

Direzione di ricerca

Start by examining the existing e2e test for the histogram in packages/app/tests/e2e/features/search/search.spec.ts. The fixtures already seed an E2E Traces source. First, add data-testid props to the RED tiles in the trace search view, likely in the component that renders ChartCard. Then write a new spec that uses searchPage.selectSource(DEFAULT_TRACES_SOURCE_NAME) to switch to the trace source and verify the RED tiles appear. Test the Errors tile toggle, the RED/Heatmap switch persistence in the URL, and that clicking a status series filters results. Run the e2e tests to confirm the new view works as expected.

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

Descrizione

Context

PR #2826 replaces the single count histogram on trace search results with RED metrics (Throughput, Errors, Duration) and adds a RED/Heatmap switch. The aggregation builders and the chart color pipeline are unit tested, but nothing drives the view end to end.

The existing search e2e specs cover the histogram on a Logs source (Histogram drag-to-zoom preserves custom SELECT columns in packages/app/tests/e2e/features/search/search.spec.ts), and that path is unchanged: the RED view only renders for trace sources. So the new view currently has no e2e coverage.

What to cover

The e2e fixtures already seed an E2E Traces source and several specs switch to it via searchPage.selectSource(DEFAULT_TRACES_SOURCE_NAME), so this should fit the existing page-object pattern:

  • Selecting a trace source renders the three RED tiles; a Logs source still renders the single histogram.
  • The Errors tile switches between Rate and Volume.
  • The RED/Heatmap switch swaps the area for the duration heatmap, and the mode survives a reload (it is stored in the URL as traceChartMode).
  • Clicking a status series on the Errors volume chart filters the results.

Notes

The RED tiles render through ChartCard, which already accepts a data-testid, but the trace search tiles do not pass one today. Adding stable test ids for the three tiles is probably the first step so the spec does not have to match on visible title text.

Lingua principale
TypeScript
Stelle
10.1k
Fork
527
Merge medio
1g 20h
PR unite (30g)
186

Preparare l'ambiente

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 ClickHouse/ClickStack

Tutte le issue di ClickHouse/ClickStack

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.