Skip to content

Refactor report by extracting CSS and JavaScript - #193

Merged
shossain786 merged 5 commits into
seleniumboot:masterfrom
codingkush:issue-179-extract-js
Oct 22, 2026
Merged

shossain786 merged 5 commits into
seleniumboot:masterfrom
codingkush:issue-179-extract-js

Conversation

@codingkush

Copy link
Copy Markdown
Contributor

What & why

Extracts the report JavaScript from report-template.html into a dedicated report/report.js resource.

HtmlReportGenerator loads the JavaScript from the classpath and inlines it into the generated HTML report. This keeps the report as a single self-contained file while preserving existing behavior for tabs, filters, search, trend charts, lightbox handling, dark mode, and failure panels.

This PR is based on the CSS extraction PR and contains only the JavaScript extraction.

Part of #179

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/) — not applicable; this is an internal refactor

Notes for reviewers

  • This PR only extracts the JavaScript.

  • CSS extraction is included through the preceding PR.

  • Markup partials, theme updates, and offline Chart.js bundling will be submitted separately.

  • HtmlReportGenerator replaces the {{REPORT_JS}} placeholder with the classpath JavaScript content.

  • The generated report remains a single self-contained HTML file.

  • Existing report behavior is preserved.

  • No runtime behavior or public API changes are included.

  • The template uses valid HTML newlines around the JavaScript placeholder:

    <script>
    {{REPORT_JS}}
    </script>

Validation

  • mvn clean verify ran all 790 tests successfully:

    • 0 failures
    • 0 errors
    • 0 skipped tests
  • The build exited during the final Maven GPG signing phase because GPG signing is not configured in the local environment. This is unrelated to this PR.

  • Focused report tests passed:

    mvn -q -Dtest=HtmlReportGeneratorTest,ReportTabBehaviourTest test
    

@shossain786
shossain786 merged commit 24652ca into seleniumboot:master Oct 22, 2026
1 check passed
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.

2 participants