Skip to content

Commit

Permalink
test(ssr): add more tests for superclasses (#4912)
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanlawson authored Nov 21, 2024
1 parent ca4fa26 commit c95f6ae
Show file tree
Hide file tree
Showing 40 changed files with 166 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<x-component>
<template shadowrootmode="open">
Use me!!!
</template>
</x-component>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const tagName = 'x-component';
export { default } from 'x/component';
export * from 'x/component';
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
Don't use me!!!
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { LightningElement } from 'lwc'
import tmpl from './tmpl.html'

export default class extends LightningElement {
hello = 'foobar'

render () {
return tmpl
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
Use me!!!
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<x-component>
<template shadowrootmode="open">
<div>
hello world
</div>
</template>
</x-component>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const tagName = 'x-component';
export { default } from 'x/component';
export * from 'x/component';
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<div>{hello} {world}</div>
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import FancyElement from 'x/fancyElement'

export default class extends FancyElement {
world = 'world'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { LightningElement } from 'lwc';

export default class extends LightningElement {
hello = 'hello'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<x-component>
<template shadowrootmode="open">
<div>
foobar
</div>
</template>
</x-component>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const tagName = 'x-component';
export { default } from 'x/component';
export * from 'x/component';
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import FancyElement from 'x/fancyElement'

export default class extends FancyElement {
hello = 'foobar'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { LightningElement } from 'lwc';
import tmpl from './tmpl.html'

export default class extends LightningElement {
render() {
return tmpl
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<div>{hello}</div>
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<x-component>
<template shadowrootmode="open">
From subclass! foobar
</template>
</x-component>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const tagName = 'x-component';
export { default } from 'x/component';
export * from 'x/component';
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import FancyElement from 'x/fancyElement'
import sub from './sub.html'

export default class extends FancyElement {
hello = 'foobar'

render() {
return sub
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
From subclass! {hello}
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { LightningElement } from 'lwc';
import tmpl from './tmpl.html'

export default class extends LightningElement {
render() {
return tmpl
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<div>{hello}</div>
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<x-component>
<template shadowrootmode="open">
<div>
yolo
</div>
</template>
</x-component>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const tagName = 'x-component';
export { default } from 'x/component';
export * from 'x/component';
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
From subclass! {hello}
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import FancyElement from 'x/fancyElement'

export default class extends FancyElement {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { LightningElement } from 'lwc';
import tmpl from './tmpl.html'

export default class extends LightningElement {
hello = 'yolo'
render() {
return tmpl
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<div>{hello}</div>
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<x-component>
<template shadowrootmode="open">
<div>
foobar
</div>
</template>
</x-component>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const tagName = 'x-component';
export { default } from 'x/component';
export * from 'x/component';
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import FancyElement from 'x/fancyElement'

export default class extends FancyElement {
hello = 'foobar'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
Don't use me!!!
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { LightningElement } from 'lwc';
import tmpl from './tmpl.html'

export default class extends LightningElement {
render() {
return tmpl
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<div>{hello}</div>
</template>
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ export const expectedFailures = new Set([
'slot-not-at-top-level/ifTrue/shadow/index.js',
'slot-not-at-top-level/lwcIf/light/index.js',
'slot-not-at-top-level/lwcIf/shadow/index.js',
'superclass/render-in-superclass/no-template-in-subclass/index.js',
'superclass/render-in-superclass/unused-default-in-subclass/index.js',
'superclass/render-in-superclass/unused-default-in-superclass/index.js',
'svgs/index.js',
'wire/config/index.js',
'wire/deep-reference/index.js',
Expand Down

0 comments on commit c95f6ae

Please sign in to comment.