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

test: add karma test showing hydration mismatch when a child component has scoped styles and a custom HTML template #4861

Conversation

nrobertdehault
Copy link
Contributor

@nrobertdehault nrobertdehault commented Nov 14, 2024

Details

Add a Karma test reproducing the hydration mismatch described in W-17163956:

  • 1 parent component
  • 1 child component with the following conditions
    • a scoped stylesheet specified via static stylesheets
    • an imported html template returned by render()

Test fails with the following error:

        Expected [ [ Error: [LWC warn]: Mismatch hydrating element <x-component>: attribute "class" has different values, expected "" but found "lwc-7to96tmocl4-host"
         ], [ Error: [LWC warn]: Hydration completed with errors.
         ] ] to have size 0.

Does this pull request introduce a breaking change?

  • 😮‍💨 No, it does not introduce a breaking change.

Does this pull request introduce an observable change?

  • 🤞 No, it does not introduce an observable change.

GUS work item

W-17163956

…t has scopd styles and a custom HTML template
@nolanlawson
Copy link
Collaborator

This looks like a duplicate of #4853. This is a great test though and we can definitely use it when we fix that issue. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants