-
-
Notifications
You must be signed in to change notification settings - Fork 153
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
Container with position:fixed/absolute is not visible during tests (due to being inside qunit-fixture) #793
Comments
I take the opportunity of this ticket (while it is still related) to ask: It seems to be intended but I think I am missing something:
|
Created an Ember app demonstrating the minimal reproduction case at https://github.com/drewlee/ember-qunit-layout-bugs/. Specifically, a failing test: https://github.com/drewlee/ember-qunit-layout-bugs/blob/main/tests/integration/components/is-visible-test.js#L9. |
I think this is fixed as of https://github.com/emberjs/ember-qunit/releases/tag/v5.1.3 (thanks @drewlee!) |
@rwjblue I just tested the new release and it does not seem to fix everything. The frame stays in this corner when tests are running. |
@MrChocolatine, this is intentional. Going forward, what was known as the "Dock container" option is now the default layout for the test page. The specific reasoning is due to the way QUnit styling was changed in v2.14.0 to
While it's not a perfect solution, it's a pretty good compromise between usability and avoiding regressions for application test suites. |
@drewlee thank you for the explanations. For now, and actually since we upgraded to v5, me and my team implemented a quick fix by adding the following CSS in But I don't know the internal mechanics etc of <style>
#qunit {
/**
* Force the testing container to render correctly instead of out of the screen, see:
* https://github.com/emberjs/ember-qunit/issues/801
*/
position: unset;
}
</style> Without the fix (the issue we know)With our custom fixThe container stays in this position, below all the tests, each time a single test is running |
This is my first time filling an issue in this project so please let me know if I need to provide more information.
After recent update to
v5.1.1
we got some tests failing.Basically the setup is container with
position:fixed; top:0; right:0; bottom:0; left:0;
that got some content inside. In non test setup its visible, however during tests execution its being reported asisNotVisible()
. Same situation is forposition:absolute;
which is probably even more common case.Tests setup (container is not visible):
https://jsfiddle.net/wmgr5467/
Non tests setup (container is visible):
https://jsfiddle.net/7jngepau/
Here's the commit that is the cause. If I disable styling changes introduced in that commit, it fixes the tests.
I saw related conversation going in this PR and I think that custom CSS played bad trick here. Can we consider rolling it back and fixing it in a different way?
The text was updated successfully, but these errors were encountered: