-
Notifications
You must be signed in to change notification settings - Fork 798
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
bug: cannot override/set EmulateViewport width for e2e tests #4601
Comments
Hey @jongirard 👋 Thanks for reporting this problem! I was able to reproduce your issue (thank you for providing a reproduction repo), and dig into what is happening a bit. Unfortunately, our documentation and implementation are a bit misleading at the moment and the Obviously, this is very unclear and, in my opinion, not the ideal scenario. So, I'm drawing up some paths forward and will bring them to the team ASAP so we can work on getting a better implementation for emulating in E2E tests. In the meantime, I'll get this issue labeled to be addressed and we'll update this issue once we have something to share. Thanks for your patience! |
Thanks @tanner-reits, appreciate your attention to this matter and looking forward to soonest possible resolution. We have a lot of mobile/desktop specific e2e tests with individual UI/UX concerns so the ability to test with varying viewport width is of very high importance. As a bonus, having the ability to update the viewport sizing in a |
This was resolved in Stencil v4.0.3. Please re-open this issue if you are still experiencing issues after updating. |
Hi @tanner-reits, so far we have used the |
Prerequisites
Stencil Version
4.0.1
Current Behavior
Currently, setting the height/width of the
viewport
object insideemulate
within thestencil.config.ts
testing object has no effect. According to the stencil config docs, this is a valid config object property.This manifests itself within e2e tests that make use of differing viewport sizes style wise (ie; desktop specific content with min-width breakpoints larger than
800px
which appears to be the default browser width in puppeteer/stencil config).Expected Behavior
emulate
object and viewport specific attributes should be set/overridden as expected.Example:
System Info
Steps to Reproduce
Please clone demo/bug specific repository at: https://github.com/jongirard/stencil-emulate-viewport-bug.
yarn install
yarn test --e2e
Expect for the "can click the desktop content" test to fail erroneously due to viewport width settings not being respected/set correctly.
Code Reproduction URL
https://github.com/jongirard/stencil-emulate-viewport-bug
Additional Information
No response
The text was updated successfully, but these errors were encountered: