-
-
Notifications
You must be signed in to change notification settings - Fork 154
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
Bring back disableContainerStyles #1102
Conversation
0829d06
to
a8b8509
Compare
* | ||
* removes the CSS for the test-container (where the app and components are rendered to) | ||
*/ | ||
disableContainerStyles: true, |
There was a problem hiding this comment.
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
return window.getComputedStyle(element); | ||
} | ||
|
||
test('the styles are present', async function (assert) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are how I test that the styles are included
return window.getComputedStyle(element); | ||
} | ||
|
||
test('the styles are not present', async function (assert) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are how I test that the styles are not included
Partially resolves: #1100
Blocked by: ember-cli/ember-cli#10296 (locally, I symlinked to this branch)This this PR is 99% boilerplate (new app), you'll want to review by-commit.
The new app is added in one commit, and all the other commits are actually meaningful.
ember-cli-build.js
'sember-qunit#disableContainerStyles
was previously undocumented, but in the interest of keeping the behavior for the upcoming v8 release, this PR re-implements the functionality that was temporarily lost in the v2-addon conversion (because v2 addons don't / can't modify the build).This approach uses
@embroider/macros
for statically analyzable config (note that@embroider/macros
can be used in non-embroider apps).Additionally, this behavior is now documented in the README with instructions for setup.
Additionally additionally, I switched the way the test-apps reference ember-qunit to use
dependenciesMeta.*.injected
, which treats the files fromember-qunit
as they would exist as installed fromnpm
-- this gives us the highest confidence that how we test is how users ofember-qunit
will experience the library.In order to test this behavior, I added another test-app, which only has one test -- asserting that the container styles are defaults (and different from what our container CSS does)