Assert render_ember_app pages emit a single HTML document - #665
Closed
tricknotes wants to merge 1 commit into
Closed
Assert render_ember_app pages emit a single HTML document#665tricknotes wants to merge 1 commit into
tricknotes wants to merge 1 commit into
Conversation
`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>
Owner
Author
|
This spec is for dummy app. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
render_ember_appemits 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: itsrender_ember_apppages go through HighVoltage withHighVoltage.layout = false, andEmberCli::EmberController#indexrenders withlayout: 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
/no-block/,/head-and-body-block/, and/(one<!DOCTYPE>, one<html>, no layout<title>), then locked that in with the new scenariojs: false) and passes locally