Skip to content

Commit 59b2b9c

Browse files
committed
add test for "support '>' in selectors that span shadow roots"
1 parent bf5db31 commit 59b2b9c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/basic.spec.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,17 @@ describe("Basic Suite", function() {
138138
expect(testComponents.length).toEqual(1);
139139
});
140140

141+
it('can see inside the shadowRoot with ">" in selector', function() {
142+
const testComponent = createTestComponent(parent, {
143+
childClassName: 'header-1',
144+
internalHTML: '<div class="header-2"><div class="find-me"></div></div>'
145+
});
146+
testComponent.shadowRoot.querySelector('.header-2').host = "test.com";
147+
testComponent.classList.add('container');
148+
const testComponents = querySelectorAllDeep(`.container > div > .header-2 > .find-me`);
149+
expect(testComponents.length).toEqual(1);
150+
});
151+
141152
it('can handle extra white space in selectors', function() {
142153
const testComponent = createTestComponent(parent, {
143154
childClassName: 'header-1',

0 commit comments

Comments
 (0)