Skip to content

Feat/feature export html - #248

Merged
shossain786 merged 3 commits into
seleniumboot:masterfrom
PUSHPAK-JAISWAL:feat/feature-export-html
Nov 11, 2026
Merged

shossain786 merged 3 commits into
seleniumboot:masterfrom
PUSHPAK-JAISWAL:feat/feature-export-html

Conversation

@PUSHPAK-JAISWAL

Copy link
Copy Markdown
Contributor

What & why

Sharing a single failing test today requires sending the entire multi-megabyte test report. This PR adds a "Download this test" action on each test's detail row that generates a completely self-contained, standalone HTML file (status, error, steps, inline Base64 screenshots, logs) suitable for attaching directly to a bug ticket (Jira, GitHub Issues, Slack).

Key Highlights:

  1. Client-Side Generation via JavaScript Blob:
    • Generates on-demand in the browser from the already-embedded data.
    • Avoids build-time disk bloat and Base64 image duplication across hundreds of test files.
    • 100% safe under browser local file:/// security policies.
  2. Fully Self-Contained & Offline:
    • Inlines all CSS, scripts, and Base64 images directly into the document.
    • Makes zero external network requests (no CDNs, external fonts, or external stylesheets).
  3. Active Theme Fidelity:
    • Inherits the active theme (dark or light) from the parent report at the instant of download.
    • Embeds an offline theme toggle button (☾ Dark Mode / ☼ Light Mode).
  4. Native Report Layout & Offline Lightbox:
    • Renders using the report's native .card.table-card and <table id="testTable"> design, eliminating cramped text overlaps.
    • Clicking any screenshot thumbnail opens the full-resolution screenshot in an interactive offline lightbox modal with keyboard navigation (Escape, ArrowLeft, ArrowRight).
  5. Fix Matrix Table Header Alignment:
    • Dynamically adds the <th>Browser</th> column header in matrix runs to eliminate horizontal shrinkage of the blue table header bar when expanding groups.

Closes #220

Type of change

  • Bug fix
  • New feature (opt-in, aligned with the framework philosophy)
  • Documentation
  • Internal refactor / test coverage

Checklist

  • All existing tests pass (mvn clean verify)
  • New behaviour is covered by unit tests
  • No new external dependencies introduced without prior discussion
  • Code follows existing conventions (no new frameworks, minimal abstraction)
  • No breaking changes to @SeleniumBootApi public APIs (or a major version bump is justified below)
  • Docs updated if user-facing behaviour changed (docs-site/)

@PUSHPAK-JAISWAL

Copy link
Copy Markdown
Contributor Author

@shossain786

Screen.Recording.2026-11-10.163733.mp4

@shossain786
shossain786 merged commit 0f0ba60 into seleniumboot:master Nov 11, 2026
2 checks passed
shossain786 added a commit that referenced this pull request Nov 11, 2026
Exported files kept the tag pills' filterByTag handler, which only exists
in the full report, so clicking a pill threw a ReferenceError. Pills now
just stop propagation, so they also no longer collapse the detail row.

Also drops a test that only wrote a sample report into target/, and
documents the "Download this test" button.

Follow-up to #248.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Report: export a single test as a standalone HTML file

2 participants