Skip to content

Commit 095a777

Browse files
test(ssr): more tests for mixed light/scoped slots (#5133)
Co-authored-by: John Hefferman <jhefferman@salesforce.com>
1 parent 2b678bb commit 095a777

File tree

21 files changed

+140
-0
lines changed

21 files changed

+140
-0
lines changed

packages/@lwc/engine-server/src/__tests__/fixtures/scoped-slots/mixed-with-light-dom-slots-inside-2/error.txt

Whitespace-only changes.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<x-parent>
2+
<template shadowrootmode="open">
3+
<x-child>
4+
<div>
5+
<!---->
6+
<!---->
7+
<!---->
8+
<span>
9+
a
10+
</span>
11+
<span>
12+
b
13+
</span>
14+
<!---->
15+
</div>
16+
</x-child>
17+
</template>
18+
</x-parent>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export const tagName = 'x-parent';
2+
export { default } from 'x/parent';
3+
export * from 'x/parent';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<template lwc:render-mode="light">
2+
<div>
3+
<slot>Default fallback slot content</slot>
4+
<slot name="foo">Named fallback slot content</slot>
5+
</div>
6+
</template>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { LightningElement } from 'lwc';
2+
3+
export default class Child extends LightningElement {
4+
static renderMode = 'light';
5+
item = { id: 99, name: 'ssr' };
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<template>
2+
<x-child>
3+
<span slot="foo">a</span>
4+
<template lwc:slot-data="data1">
5+
<span>default {data1.id} - {foo}</span>
6+
</template>
7+
<span slot="foo">b</span>
8+
</x-child>
9+
</template>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { LightningElement } from 'lwc';
2+
3+
export default class Parent extends LightningElement {
4+
foo = 'bar';
5+
}

packages/@lwc/engine-server/src/__tests__/fixtures/scoped-slots/mixed-with-light-dom-slots-inside-3/error.txt

Whitespace-only changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<x-parent>
2+
<template shadowrootmode="open">
3+
<x-child>
4+
</x-child>
5+
</template>
6+
</x-parent>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export const tagName = 'x-parent';
2+
export { default } from 'x/parent';
3+
export * from 'x/parent';

0 commit comments

Comments
 (0)