Skip to content

feat: Add spm apply command to apply manifest transformations to HTML snapshots #3

Description

@watashi-00

Summary

Implement spm apply manifest.json --input page-snapshot.html --output result.html that applies all manifest transformations (hide, replace, reconstruct) to an HTML snapshot and outputs the resulting HTML.

Motivation

Enable visual inspection and automated DOM comparison for QA testing. Output HTML can be opened in browser, diffed against expected output, or inspected by automated tools.

Implementation Notes

  • Apply hide by removing elements
  • Apply replace by substituting with component mount points
  • Apply reconstruct by replacing container content with component skeleton
  • Inject theme CSS variables into output head
  • Extract and place preserve slots

Acceptance Criteria

  • Produces valid HTML output
  • Hidden elements removed
  • Reconstructed sections show component placeholders with extracted data
  • Theme CSS injected
  • Preserve slots correctly placed

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestqa-toolingQA testing infrastructure

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions