Skip to content

Assert render_ember_app pages emit a single HTML document - #665

Closed
tricknotes wants to merge 1 commit into
mainfrom
single-document-spec
Closed

Assert render_ember_app pages emit a single HTML document#665
tricknotes wants to merge 1 commit into
mainfrom
single-document-spec

Conversation

@tricknotes

@tricknotes tricknotes commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Summary

render_ember_app emits the application's complete HTML document, so the rendering action must disable its layout — otherwise the document ends up nested inside the layout's <body>. The README documents this (render layout: false), and the dummy application already complies: its render_ember_app pages go through HighVoltage with HighVoltage.layout = false, and EmberCli::EmberController#index renders with layout: false.

Nothing asserted that, though: a layout misconfiguration in the dummy would produce invalid, nested documents while every example still passed. Add a scenario asserting that the pages rendered through render_ember_app (custom-controller pages and the default mount) contain exactly one doctype and one <html> element, and none of the layout's markup.

Verification

  • Confirmed empirically that the current dummy emits single, non-nested documents on /no-block/, /head-and-body-block/, and / (one <!DOCTYPE>, one <html>, no layout <title>), then locked that in with the new scenario
  • The scenario runs under the rack_test driver (js: false) and passes locally

`render_ember_app` emits the application's complete HTML document,
so the rendering action must disable its layout,
or the document ends up nested inside the layout's `<body>`.
The dummy application already renders without a layout (`HighVoltage.layout = false`),
but nothing asserted it:
a misconfiguration would produce invalid, nested documents while every example still passes.

Assert that the pages rendered through `render_ember_app` contain exactly one
doctype and `<html>` element, and none of the layout's markup.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@tricknotes

Copy link
Copy Markdown
Owner Author

This spec is for dummy app.

@tricknotes tricknotes closed this Sep 4, 2026
@tricknotes
tricknotes deleted the single-document-spec branch September 4, 2026 11:52
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