提交 7388954c 编写于 作者: H hdx

v-bind: add test file

上级 1b71824d
......@@ -6,6 +6,12 @@ describe('v-bind', () => {
page = await program.reLaunch(PAGE_PATH)
await page.waitFor(500)
})
it('button-disabled', async () => {
const button = await page.$('.button-disabled')
expect(await button.property('disabled')).toBe(true)
})
it('button-v-bind:disabled', async () => {
const button = await page.$('.button-v-bind-disabled')
expect(await button.property('disabled')).toBe(true)
})
})
<template>
<view class="page">
<view class="split-title">v-bind</view>
<button :disabled="isButtonDisabled">Button</button>
<button v-bind:disabled="isButtonDisabled">Button</button>
<button class="button-disabled" :disabled="isButtonDisabled">Button</button>
<button class="button-v-bind-disabled" v-bind:disabled="isButtonDisabled">Button</button>
</view>
</template>
......@@ -12,8 +12,6 @@
return {
isButtonDisabled: true
}
},
methods: {
}
}
</script>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册