-
Notifications
You must be signed in to change notification settings - Fork 781
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
37db3d2
commit 600d5c8
Showing
13 changed files
with
143 additions
and
17 deletions.
There are no files selected for viewing
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
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
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,18 @@ | ||
import { Component, h } from '@stencil/core'; | ||
|
||
@Component({ | ||
tag: 'cmp-a', | ||
shadow: true, | ||
}) | ||
export class ComponentA { | ||
render() { | ||
return ( | ||
<div> | ||
<section> | ||
<span>I am in component A</span> | ||
</section> | ||
<cmp-b></cmp-b> | ||
</div> | ||
); | ||
} | ||
} |
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,18 @@ | ||
import { Component, h } from '@stencil/core'; | ||
|
||
@Component({ | ||
tag: 'cmp-b', | ||
shadow: true, | ||
}) | ||
export class ComponentB { | ||
render() { | ||
return ( | ||
<div> | ||
<section> | ||
<span>I am in component B</span> | ||
</section> | ||
<cmp-c></cmp-c> | ||
</div> | ||
); | ||
} | ||
} |
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,15 @@ | ||
import { Component, h } from '@stencil/core'; | ||
|
||
@Component({ | ||
tag: 'cmp-c', | ||
shadow: true, | ||
}) | ||
export class ComponentC { | ||
render() { | ||
return ( | ||
<div> | ||
<span>I am in component C</span> | ||
</div> | ||
); | ||
} | ||
} |
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,23 @@ | ||
import { newE2EPage } from '@stencil/core/testing'; | ||
|
||
describe('goto root url', () => { | ||
it('have custom hydrate flags and css', async () => { | ||
// create a new puppeteer page | ||
const page = await newE2EPage({ | ||
html: ` | ||
<cmp-a></cmp-a> | ||
`, | ||
}); | ||
|
||
const spanCmpA = await page.$('cmp-a >>> span'); | ||
expect(await spanCmpA.evaluate((el) => el.textContent)).toBe('I am in component A'); | ||
const spanCmpB = await page.$('cmp-a >>> cmp-b >>> span'); | ||
expect(await spanCmpB.evaluate((el) => el.textContent)).toBe('I am in component B'); | ||
const spanCmpC = await page.$('cmp-a >>> cmp-b >>> cmp-c >>> span'); | ||
expect(await spanCmpC.evaluate((el) => el.textContent)).toBe('I am in component C'); | ||
|
||
// we skip through the shadow dom | ||
const spanCmp = await page.$('cmp-a >>> cmp-c >>> span'); | ||
expect(await spanCmp.evaluate((el) => el.textContent)).toBe('I am in component C'); | ||
}); | ||
}); |
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,23 @@ | ||
# cmp-c | ||
|
||
|
||
|
||
<!-- Auto Generated Below --> | ||
|
||
|
||
## Dependencies | ||
|
||
### Used by | ||
|
||
- [cmp-b](.) | ||
|
||
### Graph | ||
```mermaid | ||
graph TD; | ||
cmp-b --> cmp-c | ||
style cmp-c fill:#f9f,stroke:#333,stroke-width:4px | ||
``` | ||
|
||
---------------------------------------------- | ||
|
||
*Built with [StencilJS](https://stenciljs.com/)* |
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
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
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
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
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
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