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

test: web端启用吸顶测试例

上级 21e2a5ed
describe('component-native-sticky-header', () => {
if (process.env.uniTestPlatformInfo.startsWith('android')) {
let page
beforeAll(async () => {
page = await program.reLaunch('/pages/component/sticky-header/sticky-header')
......@@ -12,10 +11,4 @@ describe('component-native-sticky-header', () => {
const image = await program.screenshot();
expect(image).toMatchImageSnapshot();
})
} else {
// TODO: web 端暂不支持
it('web', async () => {
expect(1).toBe(1)
})
}
})
describe('component-native-sticky-section', () => {
if (process.env.uniTestPlatformInfo.startsWith('android')) {
let page
beforeAll(async () => {
page = await program.reLaunch('/pages/component/sticky-section/sticky-section')
......@@ -20,18 +19,14 @@ describe('component-native-sticky-section', () => {
await page.setData({
scrolling: 'true'
})
if (process.env.uniTestPlatformInfo.startsWith('android')) {
//跳转到id为C的StickyHeader位置
await page.callMethod('gotoStickyHeader', 'C')
}
await page.waitFor(async () => {
return await page.data('scrolling') === false;
});
const image = await program.screenshot();
expect(image).toMatchImageSnapshot();
})
} else {
// TODO: web 端暂不支持
it('web', async () => {
expect(1).toBe(1)
})
}
})
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册