-
Notifications
You must be signed in to change notification settings - Fork 399
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(ssr): add more superclass tests (#5065)
- Loading branch information
1 parent
a6e321c
commit a971395
Showing
43 changed files
with
146 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
7 changes: 7 additions & 0 deletions
7
...src/__tests__/fixtures/superclass/render-in-superclass/template-in-subclass/expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
...s/superclass/render-in-superclass/template-in-subclass/modules/x/component/component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
<div>Hello from the subclass {hello}</div> | ||
</template> |
5 changes: 5 additions & 0 deletions
5
...res/superclass/render-in-superclass/template-in-subclass/modules/x/component/component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; | ||
} |
8 changes: 8 additions & 0 deletions
8
...perclass/render-in-superclass/template-in-subclass/modules/x/fancyElement/fancyElement.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
File renamed without changes.
Empty file.
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
...lwc/engine-server/src/__tests__/fixtures/superclass/template-in-superclass/basic/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
...fixtures/superclass/template-in-superclass/basic/modules/x/fancyElement/fancyElement.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
<div>{hello}</div> | ||
</template> |
File renamed without changes.
Empty file.
7 changes: 7 additions & 0 deletions
7
...src/__tests__/fixtures/superclass/template-in-superclass/render-in-subclass/expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
3 changes: 3 additions & 0 deletions
3
...rver/src/__tests__/fixtures/superclass/template-in-superclass/render-in-subclass/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |
10 changes: 10 additions & 0 deletions
10
...ests__/fixtures/superclass/template-in-superclass/render-in-subclass/modules/x/sub/sub.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
...fixtures/superclass/template-in-superclass/render-in-subclass/modules/x/sub/template.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
<div>Hello from the subclass, {name}!</div> | ||
</template> |
3 changes: 3 additions & 0 deletions
3
.../fixtures/superclass/template-in-superclass/render-in-subclass/modules/x/super/super.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
<div>Hello {name}</div> | ||
</template> |
3 changes: 3 additions & 0 deletions
3
...__/fixtures/superclass/template-in-superclass/render-in-subclass/modules/x/super/super.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { LightningElement } from 'lwc'; | ||
|
||
export default class extends LightningElement {} |
Empty file.
7 changes: 7 additions & 0 deletions
7
...s/superclass/template-in-superclass/template-in-super-render-in-super-super/expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
3 changes: 3 additions & 0 deletions
3
...xtures/superclass/template-in-superclass/template-in-super-render-in-super-super/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |
5 changes: 5 additions & 0 deletions
5
...class/template-in-superclass/template-in-super-render-in-super-super/modules/x/sub/sub.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; | ||
} |
3 changes: 3 additions & 0 deletions
3
...template-in-superclass/template-in-super-render-in-super-super/modules/x/super/super.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
<div>Hello from the super class, {name}!</div> | ||
</template> |
3 changes: 3 additions & 0 deletions
3
...s/template-in-superclass/template-in-super-render-in-super-super/modules/x/super/super.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import SuperSuper from 'x/superSuper'; | ||
|
||
export default class extends SuperSuper {} |
3 changes: 3 additions & 0 deletions
3
...te-in-superclass/template-in-super-render-in-super-super/modules/x/superSuper/custom.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
8 changes: 8 additions & 0 deletions
8
...-in-superclass/template-in-super-render-in-super-super/modules/x/superSuper/superSuper.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
Empty file.
7 changes: 7 additions & 0 deletions
7
...s/superclass/template-in-superclass/template-in-super-super-render-in-super/expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
3 changes: 3 additions & 0 deletions
3
...xtures/superclass/template-in-superclass/template-in-super-super-render-in-super/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |
5 changes: 5 additions & 0 deletions
5
...class/template-in-superclass/template-in-super-super-render-in-super/modules/x/sub/sub.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; | ||
} |
3 changes: 3 additions & 0 deletions
3
...emplate-in-superclass/template-in-super-super-render-in-super/modules/x/super/custom.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
<div>Hello from the super class, {name}!</div> | ||
</template> |
8 changes: 8 additions & 0 deletions
8
...s/template-in-superclass/template-in-super-super-render-in-super/modules/x/super/super.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
...n-superclass/template-in-super-super-render-in-super/modules/x/superSuper/superSuper.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
3 changes: 3 additions & 0 deletions
3
...-in-superclass/template-in-super-super-render-in-super/modules/x/superSuper/superSuper.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { LightningElement } from 'lwc'; | ||
|
||
export default class extends LightningElement {} |
Empty file.
7 changes: 7 additions & 0 deletions
7
..._tests__/fixtures/superclass/template-in-superclass/template-in-super-super/expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
3 changes: 3 additions & 0 deletions
3
...src/__tests__/fixtures/superclass/template-in-superclass/template-in-super-super/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |
5 changes: 5 additions & 0 deletions
5
..._/fixtures/superclass/template-in-superclass/template-in-super-super/modules/x/sub/sub.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; | ||
} |
3 changes: 3 additions & 0 deletions
3
...xtures/superclass/template-in-superclass/template-in-super-super/modules/x/super/super.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import SuperSuper from 'x/superSuper'; | ||
|
||
export default class extends SuperSuper {} |
3 changes: 3 additions & 0 deletions
3
...class/template-in-superclass/template-in-super-super/modules/x/superSuper/superSuper.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
<div>Hello {name}</div> | ||
</template> |
3 changes: 3 additions & 0 deletions
3
...erclass/template-in-superclass/template-in-super-super/modules/x/superSuper/superSuper.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { LightningElement } from 'lwc'; | ||
|
||
export default class extends LightningElement {} |