fix: v2 hydration test failures#5227
Conversation
...rver/src/__tests__/fixtures/attribute-and-class-modify/parent-child/modules/x/child/child.js
Show resolved
Hide resolved
packages/@lwc/engine-server/src/__tests__/fixtures/inner-outer-html/inner-div/expected.html
Show resolved
Hide resolved
packages/@lwc/integration-karma/scripts/karma-plugins/hydration-tests.js
Show resolved
Hide resolved
| @@ -1,3 +1,3 @@ | |||
| <template> | |||
| <x-dynamic-cmp lwc:dynamic={Ctor} label={label}></x-dynamic-cmp> | |||
There was a problem hiding this comment.
lwc:dynamic is deprecated and intentionally not allowed in V2. Figured it was sufficient to swap this out for the correct directive?
There was a problem hiding this comment.
Hmm yeah that's probably the right call. At the very least, we definitely want to have the new style, and old style is probably not needed.
There was a problem hiding this comment.
Pathing is necessary here, thanks
packages/@lwc/integration-karma/test-hydration/inner-outer-html/x/main/main.html
Show resolved
Hide resolved
divmain
left a comment
There was a problem hiding this comment.
Just the one question; otherwise looks great.
| original | ||
| </x-component> | ||
| </template> | ||
| </fixture-test> No newline at end of file |
There was a problem hiding this comment.
I don't see any differences between expected.html and expected-ssr.html.
There was a problem hiding this comment.
Yes you're right, the pathing is not needed for this case.
| @@ -1,3 +1,3 @@ | |||
| <template> | |||
| <x-dynamic-cmp lwc:dynamic={Ctor} label={label}></x-dynamic-cmp> | |||
There was a problem hiding this comment.
Hmm yeah that's probably the right call. At the very least, we definitely want to have the new style, and old style is probably not needed.
| // Class should be set explicitly to avoid it being overridden by connectedCallback classList mutation. | ||
| if (attrs.class) { | ||
| this.className = attrs.class; | ||
| } |
Details
Does this pull request introduce a breaking change?
Does this pull request introduce an observable change?
GUS work item
W-17856163