提交 3b3b5556 编写于 作者: 雪洛's avatar 雪洛

test: 增加css内使用v-bind的测试例,暂时只支持web端#issue-1370

上级 ded0c283
......@@ -78,6 +78,14 @@
"navigationBarTitleText": "v-bind-set"
}
},
// #ifdef WEB
{
"path": "pages/directive/v-bind/v-bind-css",
"style": {
"navigationBarTitleText": "v-bind-css"
}
},
// #endif
{
"path": "pages/directive/v-for/v-for",
"style": {
......
const PAGE_PATH = '/pages/directive/v-bind/v-bind-css'
describe('v-bind-css', () => {
if (!process.env.uniTestPlatformInfo.startsWith('web')) {
it('not-support', async () => {
expect(1).toBe(1)
})
return
}
let page
beforeAll(async () => {
page = await program.reLaunch(PAGE_PATH)
await page.waitFor(500)
})
it('screenshot', async () => {
await page.waitFor(500)
const image = await program.screenshot({
fullPage: true
});
expect(image).toMatchImageSnapshot();
})
})
\ No newline at end of file
<template>
<view>
<view class="rect-bind"></view>
</view>
</template>
<script>
export default {
data() {
return {
classBindColor: "#008000"
}
}
}
</script>
<style scoped>
.rect-bind {
background-color: v-bind(classBindColor);
padding: 100px;
}
</style>
\ No newline at end of file
......@@ -152,6 +152,16 @@
url: 'v-bind/v-bind-style',
enable: true,
},
{
name: 'v-bind-css',
url: 'v-bind/v-bind-css',
// #ifdef WEB
enable: true,
// #endif
// #ifndef WEB
enable: false,
// #endif
},
{
name: 'v-bind-props',
url: 'v-bind/v-bind-props',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册