Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring back disableContainerStyles #1102

Merged
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,21 @@ jobs:
- run: pnpm test:ember
working-directory: test-app

buildtime-options-tests:
name: "Buildtime Options Tests"
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: wyvox/action@v1
- run: pnpm lint
- run: pnpm test:ember
working-directory: test-app
- name: embroider test
run: node_modules/.bin/ember try:one embroider-optimized --skip-cleanup
working-directory: test-app


floating-dependencies:
name: 'Floating Dependencies'
runs-on: ubuntu-latest
Expand Down
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,37 @@ module('basic acceptance test', function(hooks) {
});
```

## Configuration

Configuration is optionally managed via [`@embroider/macros`](https://www.npmjs.com/package/@embroider/macros)

To configure `ember-qunit`, in your `ember-cli-build.js`, add:
```js
'use strict';

const EmberApp = require('ember-cli/lib/broccoli/ember-app');

module.exports = function (defaults) {
const app = new EmberApp(defaults, {
'@embroider/macros': {
setConfig: {
'ember-qunit': {
/**
* default: false
*
* removes the CSS for the test-container (where the app and components are rendered to)
*/
disableContainerStyles: true,
Copy link
Sponsor Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was previously an undocumented feature

},
},
},
/* ... */
});

/* ... */
};
```


Contributing
------------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions addon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
},
"dependencies": {
"@embroider/addon-shim": "^1.0.0",
"@embroider/macros": "^1.11.1",
"ember-cli-test-loader": "^3.0.0"
},
"devDependencies": {
Expand Down
7 changes: 6 additions & 1 deletion addon/src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
/* globals Testem */
import 'qunit/qunit/qunit.css';
import './test-container-styles.css';

import { macroCondition, getOwnConfig, importSync } from '@embroider/macros';

if (macroCondition(!getOwnConfig()?.disableContainerStyles)) {
importSync('./test-container-styles.css');
}

export { default as QUnitAdapter, nonTestDoneCallback } from './adapter';
export { loadTests } from './test-loader';
Expand Down
Loading
Loading