Skip to content

Commit 5515e00

Browse files
committed
Auto merge of #4295 - Turbo87:app-test-background, r=Turbo87
Adjust application test background color This ensures that the checker board pattern is used in rendering tests, but application tests use the correct background from the `body` element.
2 parents b03ebf3 + 6800250 commit 5515e00

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

tests/helpers/index.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,18 @@ export function setupApplicationTest(hooks, options) {
1010
upstreamSetupApplicationTest(hooks, options);
1111
setupMirage(hooks);
1212
setupSentryMock(hooks);
13+
setupAppTestBodyClass(hooks);
14+
}
15+
16+
function setupAppTestBodyClass(hooks) {
17+
const ID = 'app-test';
18+
19+
hooks.beforeEach(function () {
20+
this.bodyClass = this.owner.lookup('service:body-class');
21+
this.bodyClass.register(ID, ['app-test']);
22+
});
23+
24+
hooks.afterEach(function () {
25+
this.bodyClass.deregister(ID);
26+
});
1327
}

vendor/qunit.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
#ember-testing-container {
1+
body.app-test .ember-application {
22
background-color: var(--header-bg-color);
33
}

0 commit comments

Comments
 (0)