Skip to content

Commit

Permalink
test(ssr): add more superclass tests (#5065)
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanlawson authored Dec 19, 2024
1 parent a6e321c commit a971395
Show file tree
Hide file tree
Showing 43 changed files with 146 additions and 0 deletions.
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 @@
<template>
<div>Hello from the subclass {hello}</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 {
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 @@
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}</div>
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<x-sub>
<template shadowrootmode="open">
<div>
Hello from the subclass, world!
</div>
</template>
</x-sub>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const tagName = 'x-sub';
export { default } from 'x/sub';
export * from 'x/sub';
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import Super from 'x/super';
import template from './template.html';

export default class extends Super {
name = 'world';

render() {
return template;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<div>Hello from the subclass, {name}!</div>
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<div>Hello {name}</div>
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { LightningElement } from 'lwc';

export default class extends LightningElement {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<x-sub>
<template shadowrootmode="open">
<div>
Hello from the super-super class, world!
</div>
</template>
</x-sub>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const tagName = 'x-sub';
export { default } from 'x/sub';
export * from 'x/sub';
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Super from 'x/super';

export default class extends Super {
name = 'world';
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<div>Hello from the super class, {name}!</div>
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import SuperSuper from 'x/superSuper';

export default class extends SuperSuper {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<div>Hello from the super-super class, {name}!</div>
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { LightningElement } from 'lwc';
import Custom from './custom.html';

export default class extends LightningElement {
render() {
return Custom;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<x-sub>
<template shadowrootmode="open">
<div>
Hello from the super class, world!
</div>
</template>
</x-sub>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const tagName = 'x-sub';
export { default } from 'x/sub';
export * from 'x/sub';
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Super from 'x/super';

export default class extends Super {
name = 'world';
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<div>Hello from the super class, {name}!</div>
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import SuperSuper from 'x/superSuper';
import Custom from './custom.html';

export default class extends SuperSuper {
render() {
return Custom;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<div>Hello from the super-super class, {name}!</div>
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { LightningElement } from 'lwc';

export default class extends LightningElement {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<x-sub>
<template shadowrootmode="open">
<div>
Hello world
</div>
</template>
</x-sub>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const tagName = 'x-sub';
export { default } from 'x/sub';
export * from 'x/sub';
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Super from 'x/super';

export default class extends Super {
name = 'world';
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import SuperSuper from 'x/superSuper';

export default class extends SuperSuper {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<div>Hello {name}</div>
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { LightningElement } from 'lwc';

export default class extends LightningElement {}

0 comments on commit a971395

Please sign in to comment.