Skip to content

[Feature]: Test step names as tooltips in HTML report #43741

Open

Description

🚀 Feature Request

Hovering over test step names in produced HTML reports should display their whole text as a tooltip.

Example

Hovering over a lengthy step name will show the full name as a standard HTML tooltip to the user.

Motivation

Because step names can contain programmatic input due to string substitution, it is possible that the length of these step names can exceed the allotted width within the Test Steps container in the report.

Activity

  1. github-actions commented on Oct 29, 2026

    @github-actions
  2. github-actions commented on Oct 29, 2026

    @github-actions
    Contributor

    Hi, I'm the Playwright bot and I checked the HTML report on Linux.

    Step-name tooltips are not available today. On 1.65.0-next (3bd3ed34365e5c8a60c7ee23dbc401b0566f4fce), long names are shortened visually, but the complete text remains in the report. The step renderer does not set the HTML title attribute needed for a native tooltip, and there is no existing reporter option to enable one.

    This is a report UI feature request, not a browser bug. A UI decision remains whether the tooltip should show only the step name or also its subtitle.

    Verification and acceptance check

    I extended the existing should render test.step subtitle test with this step:

    const stepTitle = 'Add to cart ' + 'product input '.repeat(30);
    await test.step(stepTitle, async () => {}, { subtitle: 'SKU 42' });

    In the generated report at an 800-by-600 viewport, the check confirmed that the name is actually clipped (scrollWidth > clientWidth), the full name and subtitle remain in its accessible label, and hovering the step text finds no title attribute on that text or its ancestors.

    npm run ttest -- reporter-html.spec.ts --grep 'should render test.step subtitle' --workers=1 passed both the directly generated and merged report cases using the suite's Chrome channel, headless on Linux. No other browsers or releases were tested; the report did not specify a version.

    An acceptance-test sketch records today's behavior and places the desired full-name tooltip assertion after test.fixme. Both cases skip as intended with that marker. No implementation is proposed.

    Triaged on Linux by the Playwright bot - agent run

  3. OKAN-SOFTWARE commented on Oct 29, 2026

    @OKAN-SOFTWARE

    I'd like to contribute a focused fix for this.

    I can update the HTML report's step renderer to expose the full step name as a native tooltip, while preserving the existing truncation and accessibility behavior.

    I'll also add regression coverage for long step names and subtitles.

    Would this be acceptable for a community contribution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions