提交 1e2ff0c3 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

feat: 补充未识别组件当做 view 处理示例

上级 bfc5b606
......@@ -248,6 +248,13 @@
"enablePullDownRefresh": false
}
},
{
"path": "pages/rendering/unrecognized-component/unrecognized-component",
"style": {
"navigationBarTitleText": "unrecognized-component",
"enablePullDownRefresh": false
}
},
{
"path": "pages/rendering/component/component",
"style": {
......
......@@ -220,11 +220,16 @@
url: 'slots',
enable: true,
},
{
name: 'component',
url: 'component',
enable: true,
},
{
name: 'component',
url: 'component',
enable: true,
},
{
name: 'unrecognized component',
url: 'unrecognized-component',
enable: true,
},
] as PageItem[],
},
{
......@@ -371,11 +376,11 @@
getLifeCycleNum() : number {
return state.lifeCycleNum
},
// 自动化测试
checkLaunchPath() : boolean {
const app = getApp()
return app.checkLaunchPath()
},
// 自动化测试
checkLaunchPath() : boolean {
const app = getApp()
return app.checkLaunchPath()
},
},
}
</script>
......
describe('/pages/rendering/unrecognized-component/unrecognized-component', () => {
let page
beforeAll(async () => {
page = await program.reLaunch('/pages/rendering/unrecognized-component/unrecognized-component')
await page.waitFor('text')
})
it('unrecognized-component should be created as "view"', async () => {
const element = await page.$('text')
expect(await element.text()).toBe('text in unrecognized component')
})
});
\ No newline at end of file
<template>
<Abc><text>text in unrecognized component</text></Abc>
</template>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册