const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
const isMP = platformInfo.startsWith('mp')
describe('component-native-list-view', () => {
if (isMP) {
it('skip mp', () => {
expect(1).toBe(1)
})
return
}
let page
beforeAll(async () => {
page = await program.reLaunch('/pages/component/list-view/list-view-multiplex')
await page.waitFor('list-view')
})
it('check_list_item_multiplex', async () => {
await page.callMethod('listViewScrollByY', 5000)
await page.waitFor(400)
await page.callMethod('listViewScrollByY', 100)
})
it('check_list_item_v_show', async () => {
await page.callMethod('delayShow')
await page.waitFor(async () => {
return await page.data('list_show') === true;
});
await page.waitFor(1000)
const image = await program.screenshot({fullPage: true});
expect(image).toSaveImageSnapshot();
})
it('check_switch_item_content', async () => {
await page.callMethod('switchItemContent')
await page.waitFor(async () => {
return await page.data('displayArrow') === true;
});
await page.waitFor(600)
const image = await program.screenshot({fullPage: true});
expect(image).toSaveImageSnapshot();
})
})