提交 92e5a95c 编写于 作者: DCloud-yinjiacheng's avatar DCloud-yinjiacheng

更新z-index自动化测试用例

上级 57c1cf43
describe('css-z-index', () => {
let page;
beforeAll(async () => {
page = await program.reLaunch('/pages/CSS/layout/z-index');
});
it('test crash', async () => {
if (process.env.uniTestPlatformInfo.startsWith('android')) {
await page.setData({
autoTest: true
});
const elements = await page.$$('view');
expect(elements.length).toBeGreaterThan(0);
await page.setData({
autoTest: false
});
} else {
expect(1).toBe(1);
}
});
});
...@@ -36,13 +36,19 @@ ...@@ -36,13 +36,19 @@
</view> </view>
</view> </view>
</view> </view>
<view v-if="autoTest">
<view style="z-index: 1;position: fixed;">111</view>
<view style="width: 750rpx;">222</view>
</view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
zIndex: 5 zIndex: 5,
// 自动化测试
autoTest: false
} }
}, },
methods: { methods: {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册