提交 347081c1 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

test(rpx2px): 补充 id, 修复测试失败

上级 9190b370
...@@ -11,10 +11,10 @@ describe('API-rpx2px', () => { ...@@ -11,10 +11,10 @@ describe('API-rpx2px', () => {
} }
beforeAll(async () => { beforeAll(async () => {
page = await program.reLaunch(PAGE_PATH) page = await program.reLaunch(PAGE_PATH)
await page.waitFor(600); await page.waitFor('view');
}); });
it('rpx2px', async () => { it('rpx2px', async () => {
const btnConvert = await page.$('.convert') const btnConvert = await page.$('#convert')
await btnConvert.tap() await btnConvert.tap()
await page.waitFor(100) await page.waitFor(100)
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</view> </view>
</view> </view>
<view> <view>
<button @click="rpx2px">转换</button> <button id="convert" @click="rpx2px">转换</button>
</view> </view>
</view> </view>
<!-- #ifdef APP --> <!-- #ifdef APP -->
...@@ -64,4 +64,4 @@ ...@@ -64,4 +64,4 @@
font-weight: bold; font-weight: bold;
line-height: 2; line-height: 2;
} }
</style> </style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册