Angular Component styling is inconsistent #26529
Labels
CT
Issue related to component testing
npm: @cypress/angular
@cypress/angular package issues
stage: needs investigating
Someone from Cypress needs to look at this
Current behavior
When mounting an Angular component that has both
styleUrls
andstyles
defined, this creates an inconsistent result. It seems that the styles are applied in a different order in comparison when serving the application.The stylesheet defines a yellow background and the inline styling defines a lightblue background. When serving the app, the button is always lightblue. When mounting the component via Cypress, it's yellow.
Desired behavior
Have a consistent behavior when mounting Angular components in comparison when serving the application.
Test code to reproduce
https://github.com/Jorrex/cypress-angular-ct-style
Cypress Version
10.2.6
Node version
v16.16.0
Operating System
Windows 10.0.22621.1555
Debug Logs
See attachment 'logs.txt'
Other
Worth noting that this example and our real repo is using Nx.
logs.txt
The text was updated successfully, but these errors were encountered: