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.userAgent is not used in E2E Screenshot tests #5459

Closed
3 tasks done
mlechler opened this issue Mar 12, 2024 · 3 comments
Closed
3 tasks done

bug: emulate.userAgent is not used in E2E Screenshot tests #5459

mlechler opened this issue Mar 12, 2024 · 3 comments
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil

Comments

@mlechler
Copy link

mlechler commented Mar 12, 2024

Prerequisites

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

@mlechler mlechler changed the title bug: emulate.userAgentis not used in E2E Screenshot tests bug: emulate.userAgent is not used in E2E Screenshot tests Mar 12, 2024
@alicewriteswrongs alicewriteswrongs self-assigned this Mar 12, 2024
@alicewriteswrongs
Copy link
Contributor

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!

@alicewriteswrongs alicewriteswrongs added the Bug: Validated This PR or Issue is verified to be a bug within Stencil label Mar 12, 2024
@ionitron-bot ionitron-bot bot removed the triage label Mar 12, 2024
@alicewriteswrongs alicewriteswrongs removed their assignment Mar 12, 2024
@mlechler
Copy link
Author

@alicewriteswrongs @rwaskiewicz @tanner-reits
Is there any timeline for this issue?

@christian-bromann
Copy link
Member

@mlechler the Stencil team has decided to discontinue the screenshot testing feature in favor of screenshot testing capabilities of other more established tools like WebdriverIO or Playwright. Moving forward we are looking into making Stencil lighter to keep it maintainable. Testing is one of the areas where we believe other tools do much better and should be the choice when testing Stencil components.

I am happy to assist with transitioning to e.g. WebdriverIO which provides similar component / screenshot testing capabilities as the current stencil test feature. It allows you to emulate the user agent via the emulate command.

I will go ahead and close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil
Projects
None yet
Development

No branches or pull requests

4 participants