Skip to content

nocontainer hides the test container but keeps it scaled to 640x384 - #1209

Merged
NullVoxPopuli merged 1 commit into
emberjs:mainfrom
gitKrystan:gitKrystan/nocontainer-full-screen
Nov 17, 2026
Merged

NullVoxPopuli merged 1 commit into
emberjs:mainfrom
gitKrystan:gitKrystan/nocontainer-full-screen

Conversation

@gitKrystan

Copy link
Copy Markdown
Contributor

With ?nocontainer (the "Hide container" checkbox), setupTestContainer adds ember-testing-container-hidden, which sets only opacity: 0; pointer-events: none. The container keeps its default size: fixed at 640x384, with #ember-testing at 200% and scale(0.5).

That small, scaled box exists so you can watch the app next to the QUnit report. A hidden box has no reason to be small. Its size still changes how layout-dependent code behaves: overflow menus collapse, virtualized tables render fewer rows, and coordinates come back scaled. Tests that pass in a normal run then fail only when the container is hidden.

With this PR, nocontainer also adds ember-testing-container-full-screen, as devmode and fullscreencontainer already do. You can get the same result today with ?nocontainer&fullscreencontainer, but the checkbox sets only nocontainer, and nothing tells users they need both. The hidden container still has pointer-events: none, so clicks reach the QUnit report under it.

Evidence from a large Ember app, with a 1440x813 viewport:

  • With ?nocontainer alone, the container measures 640x384 at scale 0.5. With this change, it measures 1440x813, the same as ?fullscreencontainer.
  • In a 157-file sample of the app's suite, 24 tests failed under ?nocontainer. This change fixed the 16 caused by the container size.
  • The 2 that rely on elementFromPoint still fail, because pointer-events: none is intentional for a hidden container.
  • The other 6 also fail without nocontainer, or pass when run alone.

No existing test covers setupTestContainer or the URL params, so this PR does not add one. pnpm lint passes, and pnpm test:ember in test-app passes 28/28.

Related: #923.

AI attribution: 🤖 Claude Code using Claude Opus 5.5. Used skills including gitkrystan-claude-plugin:commit. Reviewed by the author before opening.

With ?nocontainer, the test container was hidden but kept its default
640x384 size, with #ember-testing scaled to 0.5. Layout-dependent tests
therefore ran differently than in a normal run. Apply the
ember-testing-container-full-screen class for nocontainer as well, as
devmode and fullscreencontainer already do, and update the doc comment.

Verified with pnpm lint and the test-app ember test suite (28/28 passing).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NullVoxPopuli
NullVoxPopuli merged commit 18be778 into emberjs:main Nov 17, 2026
29 checks passed
@github-actions github-actions Bot mentioned this pull request Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants