Skip to content

Commit 5263b8a

Browse files
committed
chore: _shadowRoot -> shadowRoot
1 parent 764dd5f commit 5263b8a

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

packages/@vue/cli-service-global/__tests__/globalServiceBuildWc.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ test('global build --target wc', async () => {
4646
page = launched.page
4747

4848
const h1Text = await page.evaluate(() => {
49-
return document.querySelector('my-wc')._shadowRoot.querySelector('h1').textContent
49+
return document.querySelector('my-wc').shadowRoot.querySelector('h1').textContent
5050
})
5151

5252
expect(h1Text).toMatch('hi')

packages/@vue/cli-service/__tests__/buildMultiWc.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,22 @@ test('build as single wc', async () => {
3333
page = launched.page
3434

3535
const styleCount = await page.evaluate(() => {
36-
return document.querySelector('build-multi-wc-app')._shadowRoot.querySelectorAll('style').length
36+
return document.querySelector('build-multi-wc-app').shadowRoot.querySelectorAll('style').length
3737
})
3838
expect(styleCount).toBe(2) // should contain styles from both app and child
3939

4040
const h1Text = await page.evaluate(() => {
41-
return document.querySelector('build-multi-wc-app')._shadowRoot.querySelector('h1').textContent
41+
return document.querySelector('build-multi-wc-app').shadowRoot.querySelector('h1').textContent
4242
})
4343
expect(h1Text).toMatch('Welcome to Your Vue.js App')
4444

4545
const childStyleCount = await page.evaluate(() => {
46-
return document.querySelector('build-multi-wc-hello-world')._shadowRoot.querySelectorAll('style').length
46+
return document.querySelector('build-multi-wc-hello-world').shadowRoot.querySelectorAll('style').length
4747
})
4848
expect(childStyleCount).toBe(1)
4949

5050
const h2Text = await page.evaluate(() => {
51-
return document.querySelector('build-multi-wc-hello-world')._shadowRoot.querySelector('h2').textContent
51+
return document.querySelector('build-multi-wc-hello-world').shadowRoot.querySelector('h2').textContent
5252
})
5353
expect(h2Text).toMatch('Essential Links')
5454
})

packages/@vue/cli-service/__tests__/buildWc.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ test('build as single wc', async () => {
3333
page = launched.page
3434

3535
const styleCount = await page.evaluate(() => {
36-
return document.querySelector('build-wc')._shadowRoot.querySelectorAll('style').length
36+
return document.querySelector('build-wc').shadowRoot.querySelectorAll('style').length
3737
})
3838
expect(styleCount).toBe(1)
3939

4040
await page.evaluate(() => {
4141
document.querySelector('build-wc').msg = 'hello'
4242
})
4343
const h1Text = await page.evaluate(() => {
44-
return document.querySelector('build-wc')._shadowRoot.querySelector('h1').textContent
44+
return document.querySelector('build-wc').shadowRoot.querySelector('h1').textContent
4545
})
4646
expect(h1Text).toBe('hello')
4747
})

0 commit comments

Comments
 (0)