-
Notifications
You must be signed in to change notification settings - Fork 395
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
static stylesheets
fixtures (#4572)
- Loading branch information
1 parent
27195d2
commit 9cc36ae
Showing
16 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
19 changes: 19 additions & 0 deletions
19
...@lwc/engine-server/src/__tests__/fixtures/static-stylesheets-dynamic-render/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,19 @@ | ||
<x-stylish class="lwc-72njdrv8nr1-host"> | ||
<template shadowrootmode="open"> | ||
<style class="lwc-72njdrv8nr1" type="text/css"> | ||
h1 {border: 1px solid goldenrod;} | ||
</style> | ||
<style class="lwc-72njdrv8nr1" type="text/css"> | ||
h1.lwc-72njdrv8nr1 {outline: 2px solid chartreuse;} | ||
</style> | ||
<style class="lwc-72njdrv8nr1" type="text/css"> | ||
h1 {background: royalblue;} | ||
</style> | ||
<style class="lwc-72njdrv8nr1" type="text/css"> | ||
h1.lwc-72njdrv8nr1 {color: cornsilk;} | ||
</style> | ||
<h1 class="lwc-72njdrv8nr1"> | ||
hello | ||
</h1> | ||
</template> | ||
</x-stylish> |
3 changes: 3 additions & 0 deletions
3
...ages/@lwc/engine-server/src/__tests__/fixtures/static-stylesheets-dynamic-render/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-stylish'; | ||
export { default } from 'x/stylish'; | ||
export * from 'x/stylish'; |
3 changes: 3 additions & 0 deletions
3
...r/src/__tests__/fixtures/static-stylesheets-dynamic-render/modules/x/stylish/dazzling.css
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 @@ | ||
h1 { | ||
border: 1px solid goldenrod; | ||
} |
3 changes: 3 additions & 0 deletions
3
.../src/__tests__/fixtures/static-stylesheets-dynamic-render/modules/x/stylish/dazzling.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> | ||
<h1>hello</h1> | ||
</template> |
3 changes: 3 additions & 0 deletions
3
..._tests__/fixtures/static-stylesheets-dynamic-render/modules/x/stylish/dazzling.scoped.css
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 @@ | ||
h1 { | ||
outline: 2px solid chartreuse; | ||
} |
3 changes: 3 additions & 0 deletions
3
.../src/__tests__/fixtures/static-stylesheets-dynamic-render/modules/x/stylish/glamorous.css
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 @@ | ||
h1 { | ||
background: royalblue; | ||
} |
3 changes: 3 additions & 0 deletions
3
.../__tests__/fixtures/static-stylesheets-dynamic-render/modules/x/stylish/snazzy.scoped.css
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 @@ | ||
h1 { | ||
color: cornsilk; | ||
} |
12 changes: 12 additions & 0 deletions
12
...ver/src/__tests__/fixtures/static-stylesheets-dynamic-render/modules/x/stylish/stylish.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,12 @@ | ||
import { LightningElement } from 'lwc'; | ||
import glamorous from './glamorous.css' | ||
import snazzy from './snazzy.scoped.css' | ||
import dazzling from './dazzling.html' | ||
|
||
export default class extends LightningElement { | ||
static stylesheets = [glamorous, snazzy] | ||
|
||
render() { | ||
return dazzling; | ||
} | ||
} |
Empty file.
13 changes: 13 additions & 0 deletions
13
packages/@lwc/engine-server/src/__tests__/fixtures/static-stylesheets/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,13 @@ | ||
<x-stylish class="lwc-1l667kdb4s5-host"> | ||
<template shadowrootmode="open"> | ||
<style class="lwc-1l667kdb4s5" type="text/css"> | ||
h1 {background: royalblue;} | ||
</style> | ||
<style class="lwc-1l667kdb4s5" type="text/css"> | ||
h1.lwc-1l667kdb4s5 {color: cornsilk;} | ||
</style> | ||
<h1 class="lwc-1l667kdb4s5"> | ||
hello | ||
</h1> | ||
</template> | ||
</x-stylish> |
3 changes: 3 additions & 0 deletions
3
packages/@lwc/engine-server/src/__tests__/fixtures/static-stylesheets/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-stylish'; | ||
export { default } from 'x/stylish'; | ||
export * from 'x/stylish'; |
3 changes: 3 additions & 0 deletions
3
...c/engine-server/src/__tests__/fixtures/static-stylesheets/modules/x/stylish/glamorous.css
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 @@ | ||
h1 { | ||
background: royalblue; | ||
} |
3 changes: 3 additions & 0 deletions
3
...gine-server/src/__tests__/fixtures/static-stylesheets/modules/x/stylish/snazzy.scoped.css
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 @@ | ||
h1 { | ||
color: cornsilk; | ||
} |
3 changes: 3 additions & 0 deletions
3
...wc/engine-server/src/__tests__/fixtures/static-stylesheets/modules/x/stylish/stylish.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> | ||
<h1>hello</h1> | ||
</template> |
7 changes: 7 additions & 0 deletions
7
...@lwc/engine-server/src/__tests__/fixtures/static-stylesheets/modules/x/stylish/stylish.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,7 @@ | ||
import { LightningElement } from 'lwc'; | ||
import glamorous from './glamorous.css' | ||
import snazzy from './snazzy.scoped.css' | ||
|
||
export default class extends LightningElement { | ||
static stylesheets = [glamorous, snazzy] | ||
} |