-
Notifications
You must be signed in to change notification settings - Fork 795
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: emulate
is not used for E2E Screenshot tests
#5353
Comments
@mlechler I confirmed that the generated screenshots do not have the same dimensions as what is being set in the Stencil config. I'll get this ingested in our backlog for someone to take a look at. |
Hi @tanner-reits, what is the time horizon on this issue? |
@mlechler I don't have a definitive timeline right now. I spent some more time playing around with a fix, but we uncovered some additional discrepancies in the generated output. The team needs to dig in deeper to the screenshot testing process so we're confident in the change(s) we make. This is an experimental feature in Stencil after all, so there are many kinks and nuances we need to work through. |
@mlechler thanks to @tanner-reits work we were able to publish a dev release with a fix for this bug. You can install it in your project via: npm i @stencil/[email protected] Can you verify that this resolves the issue? |
Hi @christian-bromann, the viewport works great now! 🥳 I just found one more problem in our use case, which worked earlier. We are using the In our tests I can see that the Is this an additional bug or is it intended to work like that? If it is intended: How can we emulate different themes (color & spacing) in our screenshot tests? |
Awesome, I will go ahead and close the issue.
Mind raising a new issue for this? |
Great thanks @christian-bromann! I opened #5459 for the new issue. |
The fix has been released with Stencil 🚞 v4.13.0 |
Prerequisites
Stencil Version
4.12.1
Current Behavior
We have four viewports defined in the
emulate
array in thestencil.config.ts
. When running our e2e screenshot tests these defined viewports aren't used. As mentioned here, I understood, that theemulate
array should still be used for screenshot tests, which isn't the case.Expected Behavior
Use the
emulate
array of thestencil.config.ts
or provide a easy way to use multiple viewports for every e2e screenshot test, without setting every single one of it.System Info
Steps to Reproduce
Run
npm run test.screenshot
in the test repo.Should generate screenshot with 600x600, but generates 800x600
Code Reproduction URL
https://github.com/mlechler/stencil-e2e-test-bug
Additional Information
No response
The text was updated successfully, but these errors were encountered: