Skip to content

Commit 6800250

Browse files
committed
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.
1 parent b03ebf3 commit 6800250

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)