Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(integration-karma): more shadow transitivity tests #2864

Merged
merged 1 commit into from
Jun 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ import ParentResetChildAny from 'x/parentResetChildAny';
import ParentResetChildReset from 'x/parentResetChildReset';
import ParentLightChildAny from 'x/parentLightChildAny';
import ParentLightChildReset from 'x/parentLightChildReset';
import GrandparentAnyParentAnyChildAny from 'x/grandparentAnyParentAnyChildAny';
import GrandparentAnyParentAnyChildReset from 'x/grandparentAnyParentAnyChildReset';
import GrandparentAnyParentResetChildAny from 'x/grandparentAnyParentResetChildAny';
import GrandparentAnyParentResetChildReset from 'x/grandparentAnyParentResetChildReset';
import GrandparentResetParentAnyChildAny from 'x/grandparentResetParentAnyChildAny';
import GrandparentResetParentAnyChildReset from 'x/grandparentResetParentAnyChildReset';
import GrandparentResetParentResetChildAny from 'x/grandparentResetParentResetChildAny';
import GrandparentResetParentResetChildReset from 'x/grandparentResetParentResetChildReset';

// In compat mode, native components and synthetic components will both render
// in synthetic style; there's no difference.
Expand Down Expand Up @@ -49,6 +57,46 @@ if (!process.env.NATIVE_SHADOW && !process.env.COMPAT) {
tagName: 'x-parent-light-child-reset',
nativeLeaf: false,
},
{
Component: GrandparentAnyParentAnyChildAny,
tagName: 'x-grandparent-any-parent-any-child-any',
nativeLeaf: true,
},
{
Component: GrandparentAnyParentAnyChildReset,
tagName: 'x-grandparent-any-parent-any-child-reset',
nativeLeaf: true,
},
{
Component: GrandparentAnyParentResetChildAny,
tagName: 'x-grandparent-any-parent-reset-child-any',
nativeLeaf: true,
},
{
Component: GrandparentAnyParentResetChildReset,
tagName: 'x-grandparent-any-parent-reset-child-reset',
nativeLeaf: true,
},
{
Component: GrandparentResetParentAnyChildAny,
tagName: 'x-grandparent-reset-parent-any-child-any',
nativeLeaf: true,
},
{
Component: GrandparentResetParentAnyChildReset,
tagName: 'x-grandparent-reset-parent-any-child-reset',
nativeLeaf: true,
},
{
Component: GrandparentResetParentResetChildAny,
tagName: 'x-grandparent-reset-parent-reset-child-any',
nativeLeaf: true,
},
{
Component: GrandparentResetParentResetChildReset,
tagName: 'x-grandparent-reset-parent-reset-child-reset',
nativeLeaf: false,
},
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we could add Light mode tests here too, but maybe that would really be overkill. 🙂

];

scenarios.forEach(({ Component, nativeLeaf, tagName }) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<x-parent-any-child-any></x-parent-any-child-any>
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { LightningElement } from 'lwc';

export default class extends LightningElement {
static shadowSupportMode = 'any';
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<x-parent-any-child-reset></x-parent-any-child-reset>
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { LightningElement } from 'lwc';

export default class extends LightningElement {
static shadowSupportMode = 'any';
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<x-parent-reset-child-any></x-parent-reset-child-any>
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { LightningElement } from 'lwc';

export default class extends LightningElement {
static shadowSupportMode = 'any';
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<x-parent-reset-child-reset></x-parent-reset-child-reset>
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { LightningElement } from 'lwc';

export default class extends LightningElement {
static shadowSupportMode = 'any';
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<x-parent-any-child-any></x-parent-any-child-any>
</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,3 @@
<template>
<x-parent-any-child-reset></x-parent-any-child-reset>
</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,3 @@
<template>
<x-parent-reset-child-any></x-parent-reset-child-any>
</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,3 @@
<template>
<x-parent-reset-child-reset></x-parent-reset-child-reset>
</template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { LightningElement } from 'lwc';

export default class extends LightningElement {}