stencil
stencil copied to clipboard
bug: `emulate.userAgent` is not used in E2E Screenshot tests
Prerequisites
- [X] I have read the Contributing Guidelines.
- [X] I agree to follow the Code of Conduct.
- [X] I have searched for existing issues that already report this problem, without success.
Stencil Version
4.12.2-dev.1709767698.0a1aa6b
Current Behavior
The emulate.userAgent
is ignored. The sample project should write Dark
, Default
, Condensed
and Presentation
to the console, but it writes Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/116.0.5814.0 Safari/537.36
.
Expected Behavior
In an earlier version (v3) the emulate.userAgent
was used and we could generate different screenshots with different color/spacing themes.
Is there a new way to do stuff like this? Or should it work this way?
System Info
System: node 20.11.0
Platform: darwin (23.4.0)
CPU Model: Apple M1 Pro (10 cpus)
Compiler: /node_modules/@stencil/core/compiler/stencil.js
Build: 1709767698
Stencil: 4.12.2-dev.1709767698.0a1aa6b 🤓
TypeScript: 5.3.3
Rollup: 2.56.3
Parse5: 7.1.2
jQuery: 4.0.0-pre
Terser: 5.27.0
Steps to Reproduce
Run npm run test.screenshot
in the test repo.
Check the console output.
Code Reproduction URL
https://github.com/mlechler/stencil-e2e-test-bug
Additional Information
No response
Hey @mlechler, just was able to confirm that this is indeed an issue! I'll ingest it into our backlog for the team to prioritize. Thanks for reporting!