Skip to content

Commit 4382af3

Browse files
authored
Merge pull request #1102 from NullVoxPopuli/bring-back-disableContainerStyles
Bring back disableContainerStyles
2 parents 70a04db + d9c8463 commit 4382af3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+2489
-793
lines changed

.github/workflows/ci.yml

+16
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,21 @@ jobs:
2525
- run: pnpm test:ember
2626
working-directory: test-app
2727

28+
buildtime-options-tests:
29+
name: "Buildtime Options Tests"
30+
runs-on: ubuntu-latest
31+
timeout-minutes: 10
32+
33+
steps:
34+
- uses: wyvox/action@v1
35+
- run: pnpm lint
36+
- run: pnpm test:ember
37+
working-directory: test-app
38+
- name: embroider test
39+
run: node_modules/.bin/ember try:one embroider-optimized --skip-cleanup
40+
working-directory: test-app
41+
42+
2843
floating-dependencies:
2944
name: 'Floating Dependencies'
3045
runs-on: ubuntu-latest
@@ -50,6 +65,7 @@ jobs:
5065
ember-try-scenario:
5166
- ember-lts-4.4
5267
- ember-lts-4.8
68+
- ember-lts-4.12
5369
- ember-release
5470
- ember-beta
5571
- ember-canary

README.md

+31
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,37 @@ module('basic acceptance test', function(hooks) {
168168
});
169169
```
170170

171+
## Configuration
172+
173+
Configuration is optionally managed via [`@embroider/macros`](https://www.npmjs.com/package/@embroider/macros)
174+
175+
To configure `ember-qunit`, in your `ember-cli-build.js`, add:
176+
```js
177+
'use strict';
178+
179+
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
180+
181+
module.exports = function (defaults) {
182+
const app = new EmberApp(defaults, {
183+
'@embroider/macros': {
184+
setConfig: {
185+
'ember-qunit': {
186+
/**
187+
* default: false
188+
*
189+
* removes the CSS for the test-container (where the app and components are rendered to)
190+
*/
191+
disableContainerStyles: true,
192+
},
193+
},
194+
},
195+
/* ... */
196+
});
197+
198+
/* ... */
199+
};
200+
```
201+
171202

172203
Contributing
173204
------------------------------------------------------------------------------

addon/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
},
4040
"dependencies": {
4141
"@embroider/addon-shim": "^1.0.0",
42+
"@embroider/macros": "^1.11.1",
4243
"ember-cli-test-loader": "^3.0.0"
4344
},
4445
"devDependencies": {

addon/src/index.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
/* globals Testem */
22
import 'qunit/qunit/qunit.css';
3-
import './test-container-styles.css';
3+
4+
import { macroCondition, getOwnConfig, importSync } from '@embroider/macros';
5+
6+
if (macroCondition(!getOwnConfig()?.disableContainerStyles)) {
7+
importSync('./test-container-styles.css');
8+
}
49

510
export { default as QUnitAdapter, nonTestDoneCallback } from './adapter';
611
export { loadTests } from './test-loader';

0 commit comments

Comments
 (0)