Skip to content
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.viewport crops the screenshot in E2E Screenshot tests #5563

Open
3 tasks done
mlechler opened this issue Mar 21, 2024 · 1 comment
Open
3 tasks done

bug: emulate.viewport crops the screenshot in E2E Screenshot tests #5563

mlechler opened this issue Mar 21, 2024 · 1 comment
Labels
Resolution: Needs Investigation This PR or Issue should be investigated from the Stencil team

Comments

@mlechler
Copy link

Prerequisites

Stencil Version

4.13.0

Current Behavior

When using the emulate.viewport in the stencil.config.ts the produced screenshot is just cropped to the sizes.

Looks like this (see the background color, which exceeds the screenshot border):
Screenshot 2024-03-21 at 16 46 54

Expected Behavior

I would expect, that the size of the screenshot is adapted, so we can test different device sizes. In an earlier version this was exactly the behaviour.

Should look like this:
Screenshot 2024-03-21 at 16 46 02

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: 1710782619
     Stencil: 4.13.0 🚞
  TypeScript: 5.4.2
      Rollup: 2.56.3
      Parse5: 7.1.2
      jQuery: 4.0.0-pre
      Terser: 5.29.2

Steps to Reproduce

Run npm run test.screenshot in the test repo.
Check the produced screenshots.

Code Reproduction URL

https://github.com/mlechler/stencil-e2e-test-bug

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Mar 21, 2024
@tanner-reits
Copy link
Member

Hello again @mlechler 👋

Thanks for reporting the issue. Unfortunately, the team doesn't have capacity to focus on screenshot testing issues at the moment. Stencil's screenshot testing functionality is considered an experimental feature, so having someone look into this may not happen for a while (or at all frankly).

However, we welcome any community contributions! If you'd like to take a stab at fixing this, someone on the team would be happy to review your changes.

We appreciate your understanding!

@tanner-reits tanner-reits added Resolution: Needs Investigation This PR or Issue should be investigated from the Stencil team and removed triage labels Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Needs Investigation This PR or Issue should be investigated from the Stencil team
Projects
None yet
Development

No branches or pull requests

2 participants