Skip to content

Commit b5d54cd

Browse files
fix(ssr): global attribute disparities (#5247)
* chore: testing hydration * chore: added tests * chore: added dedicated tests for v1/2 delta * chore: modified public property test * fix: tabindex corrections, additional tests * chore: minor corrections * fix: prettier * chore: update undeclared test * fix: hydration test * chore: added hydration tests and v1/2 pathing * chore: test debug * chore: check error length * chore: revert hydration failure test * chore: change path strat * chore: test correction, production mode
1 parent 2937602 commit b5d54cd

File tree

69 files changed

+2558
-46
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+2558
-46
lines changed

packages/@lwc/engine-server/src/__tests__/fixtures/attribute-global-html/as-component-prop/undeclared/expected.html

+1-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<fixture-test>
22
<template shadowrootmode="open">
3-
<x-child accesskey="foo" aria-activedescendant="foo" aria-atomic="foo" aria-autocomplete="foo" aria-busy="foo" aria-checked="foo" aria-colcount="foo" aria-colindex="foo" aria-colspan="foo" aria-controls="foo" aria-current="foo" aria-describedby="foo" aria-details="foo" aria-disabled="foo" aria-errormessage="foo" aria-expanded="foo" aria-flowto="foo" aria-haspopup="foo" aria-hidden="foo" aria-invalid="foo" aria-keyshortcuts="foo" aria-label="foo" aria-labelledby="foo" aria-level="foo" aria-live="foo" aria-modal="foo" aria-multiline="foo" aria-multiselectable="foo" aria-orientation="foo" aria-owns="foo" aria-placeholder="foo" aria-posinset="foo" aria-pressed="foo" aria-readonly="foo" aria-relevant="foo" aria-required="foo" aria-roledescription="foo" aria-rowcount="foo" aria-rowindex="foo" aria-rowspan="foo" aria-selected="foo" aria-setsize="foo" aria-sort="foo" aria-valuemax="foo" aria-valuemin="foo" aria-valuenow="foo" aria-valuetext="foo" dir="foo" draggable="foo" exportparts="foo" id="foo" lang="foo" role="foo" spellcheck="foo" tabindex="foo" title="foo">
3+
<x-child accesskey="foo" aria-activedescendant="foo" aria-atomic="foo" aria-autocomplete="foo" aria-busy="foo" aria-checked="foo" aria-colcount="foo" aria-colindex="foo" aria-colspan="foo" aria-controls="foo" aria-current="foo" aria-describedby="foo" aria-details="foo" aria-disabled="foo" aria-errormessage="foo" aria-expanded="foo" aria-flowto="foo" aria-haspopup="foo" aria-hidden="foo" aria-invalid="foo" aria-keyshortcuts="foo" aria-label="foo" aria-labelledby="foo" aria-level="foo" aria-live="foo" aria-modal="foo" aria-multiline="foo" aria-multiselectable="foo" aria-orientation="foo" aria-owns="foo" aria-placeholder="foo" aria-posinset="foo" aria-pressed="foo" aria-readonly="foo" aria-relevant="foo" aria-required="foo" aria-roledescription="foo" aria-rowcount="foo" aria-rowindex="foo" aria-rowspan="foo" aria-selected="foo" aria-setsize="foo" aria-sort="foo" aria-valuemax="foo" aria-valuemin="foo" aria-valuenow="foo" aria-valuetext="foo" dir="foo" exportparts="foo" id="foo" lang="foo" role="foo" title="foo">
44
<template shadowrootmode="open">
55
<span>
66
accessKey: foo
@@ -56,9 +56,6 @@
5656
<span>
5757
ariaHasPopup: foo
5858
</span>
59-
<span>
60-
ariaHidden: foo
61-
</span>
6259
<span>
6360
ariaInvalid: foo
6461
</span>
@@ -191,9 +188,6 @@
191188
<span>
192189
disabled:
193190
</span>
194-
<span>
195-
draggable: false
196-
</span>
197191
<span>
198192
enterkeyhint:
199193
</span>
@@ -305,12 +299,6 @@
305299
<span>
306300
selected:
307301
</span>
308-
<span>
309-
spellcheck: true
310-
</span>
311-
<span>
312-
tabIndex: -1
313-
</span>
314302
<span>
315303
textarea:
316304
</span>

packages/@lwc/engine-server/src/__tests__/fixtures/attribute-global-html/as-component-prop/undeclared/modules/x/child/child.html

+1-5
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
<span>ariaExpanded: {ariaExpanded}</span>
1818
<span>ariaFlowTo: {ariaFlowTo}</span>
1919
<span>ariaHasPopup: {ariaHasPopup}</span>
20-
<span>ariaHidden: {ariaHidden}</span>
2120
<span>ariaInvalid: {ariaInvalid}</span>
2221
<span>ariaKeyShortcuts: {ariaKeyShortcuts}</span>
2322
<span>ariaLabel: {ariaLabel}</span>
@@ -62,7 +61,6 @@
6261
<span>details: {details}</span>
6362
<span>dir: {dir}</span>
6463
<span>disabled: {disabled}</span>
65-
<span>draggable: {draggable}</span>
6664
<span>enterkeyhint: {enterkeyhint}</span>
6765
<span>exportparts: {exportparts}</span>
6866
<span>fieldset: {fieldset}</span>
@@ -100,11 +98,9 @@
10098
<span>rowSpan: {rowSpan}</span>
10199
<span>select: {select}</span>
102100
<span>selected: {selected}</span>
103-
<span>spellcheck: {spellcheck}</span>
104-
<span>tabIndex: {tabIndex}</span>
105101
<span>textarea: {textarea}</span>
106102
<span>title: {title}</span>
107103
<span>translate: {translate}</span>
108104
<span>useMap: {useMap}</span>
109105
<span>video: {video}</span>
110-
</template>
106+
</template>

packages/@lwc/engine-server/src/__tests__/fixtures/attribute-global-html/as-component-prop/undeclared/modules/x/component/component.html

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
<template>
2+
<!--
3+
Please Note: There are dedicated tests for the following due to V1/2 disparities:
4+
- @lwc/engine-server/src/__tests__/fixtures/attribute-global-html/draggable
5+
- @lwc/engine-server/src/__tests__/fixtures/attribute-global-html/hidden
6+
- @lwc/engine-server/src/__tests__/fixtures/attribute-global-html/spellcheck
7+
- @lwc/engine-server/src/__tests__/fixtures/attribute-global-html/tabindex
8+
-->
29
<x-child
310
accesskey={dynamic}
411
aria-activedescendant={dynamic}
@@ -62,14 +69,12 @@
6269
details={dynamic}
6370
dir={dynamic}
6471
disabled={dynamic}
65-
draggable={dynamic}
6672
enterkeyhint={dynamic}
6773
exportparts={dynamic}
6874
fieldset={dynamic}
6975
form={dynamic}
7076
formaction={dynamic}
7177
formnovalidate={dynamic}
72-
hidden={dynamic}
7378
id={dynamic}
7479
input={dynamic}
7580
inputmode={dynamic}
@@ -100,12 +105,10 @@
100105
rowspan={dynamic}
101106
select={dynamic}
102107
selected={dynamic}
103-
spellcheck={dynamic}
104-
tabindex={dynamic}
105108
textarea={dynamic}
106109
title={dynamic}
107110
translate={dynamic}
108111
usemap={dynamic}
109112
video={dynamic}
110113
></x-child>
111-
</template>
114+
</template>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"entry": "x/component",
3+
"ssrFiles": {
4+
"error": "error-ssr.txt",
5+
"expected": "expected-ssr.html"
6+
}
7+
}

packages/@lwc/engine-server/src/__tests__/fixtures/attribute-global-html/as-component-prop/without-@api-values/error-ssr.txt

Whitespace-only changes.

packages/@lwc/engine-server/src/__tests__/fixtures/attribute-global-html/as-component-prop/without-@api-values/error.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)