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

Angular Component styling is inconsistent #26529

Open
Jorrex opened this issue Apr 18, 2023 · 2 comments
Open

Angular Component styling is inconsistent #26529

Jorrex opened this issue Apr 18, 2023 · 2 comments
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

Comments

@Jorrex
Copy link

Jorrex commented Apr 18, 2023

Current behavior

When mounting an Angular component that has both styleUrls and styles 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.
image

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

@jordanpowell88 jordanpowell88 self-assigned this Apr 18, 2023
@jordanpowell88 jordanpowell88 added routed-to-ct CT Issue related to component testing labels Apr 18, 2023
@lmiller1990
Copy link
Contributor

Possibly related and fixed in: #24272

Did not try a later Cypress version, but #24272 landed after 10.2 - might be worth updating, although I suspect it's unrelated.

@Jorrex
Copy link
Author

Jorrex commented Apr 19, 2023

Possibly related and fixed in: #24272

Did not try a later Cypress version, but #24272 landed after 10.2 - might be worth updating, although I suspect it's unrelated.

Doubt it's related to this since I have zero assets in the project. This is pure style that's defined on the Angular component.

@nagash77 nagash77 added Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team. and removed routed-to-ct labels Apr 19, 2023
@jennifer-shehane jennifer-shehane added npm: @cypress/angular @cypress/angular package issues stage: needs investigating Someone from Cypress needs to look at this and removed Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team. labels Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

5 participants