Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Cypress io Cypress Reporter Component CT

From Leeroopedia
Revision as of 11:10, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Cypress_io_Cypress_Reporter_Component_CT.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Sources
Domains UI, React
Last Updated 2026-02-12 00:00 GMT

Overview

Concrete React component for rendering component test results alongside the tested component viewport provided by the Cypress reporter package.

Description

The Reporter component is reused from E2E reporting (packages/reporter/src/main.tsx) but rendered within the component testing layout. In component testing mode, the Reporter occupies the left panel while the right panel shows the rendered component. The same BaseReporterProps interface applies, with the runnerStore tracking the component spec being tested.

Usage

This component is instantiated by the Cypress app when running in component testing mode. The layout differs from E2E mode to accommodate the component viewport.

Code Reference

Source Location

  • Repository: cypress-io/cypress
  • File: packages/reporter/src/main.tsx
  • Lines: L53-129 (Reporter component render, same as E2E but in CT layout)

Signature

// Same Reporter component used in E2E, rendered in component testing layout
const Reporter: React.FC<SingleReporterProps> = observer(({
  appState, runner, className, error, runMode, studioEnabled,
  autoScrollingEnabled, isSpecsListOpen, showFetchRequests,
  resetStatsOnSpecChange, renderReporterHeader, runnerStore
}) => { ... })

Import

import Reporter from '@packages/reporter/src/main'

I/O Contract

Inputs

Name Type Required Description
appState AppState Yes Application state
runner Runner Yes Runner instance for events
runnablesStore RunnablesStore Yes Test tree data store
statsStore StatsStore Yes Pass/fail/pending counts
runnerStore MobxRunnerStore Yes Runner store with component spec info

Outputs

Name Type Description
JSX.Element React component Test results panel for component testing layout

Usage Examples

Component Testing Layout

// In the Cypress app component testing view
<div className="ct-layout">
  <div className="reporter-panel">
    <Reporter
      appState={appState}
      runner={runner}
      runnablesStore={runnablesStore}
      statsStore={statsStore}
      studioEnabled={false}
      runnerStore={runnerStore}
      scroller={scroller}
      events={events}
    />
  </div>
  <div className="component-viewport">
    {/* Rendered component appears here */}
  </div>
</div>

Related Pages

Implements Principle

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment