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

test: 屏蔽web端不支持的测试例

上级 c20ea6d2
...@@ -2,6 +2,12 @@ const PAGE_PATH = "/pages/API/element-takesnapshot/element-takesnapshot"; ...@@ -2,6 +2,12 @@ const PAGE_PATH = "/pages/API/element-takesnapshot/element-takesnapshot";
describe("element-takesnapshot", () => { describe("element-takesnapshot", () => {
if (process.env.uniTestPlatformInfo.indexOf('web') > -1) {
it('dummyTest', () => {
expect(1).toBe(1)
})
return
}
let page; let page;
function getData(key = '') { function getData(key = '') {
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
......
const PAGE_PATH = '/pages/API/get-app-authorize-setting/get-app-authorize-setting' const PAGE_PATH = '/pages/API/get-app-authorize-setting/get-app-authorize-setting'
describe('ExtApi-GetAppAuthorizeSetting', () => { describe('ExtApi-GetAppAuthorizeSetting', () => {
if (process.env.uniTestPlatformInfo.indexOf('web') > -1) {
it('dummyTest', () => {
expect(1).toBe(1)
})
return
}
let page; let page;
let res; let res;
......
const PAGE_PATH = '/pages/API/get-battery-info/get-battery-info' const PAGE_PATH = '/pages/API/get-battery-info/get-battery-info'
describe('ExtApi-GetBatteryInfo', () => { describe('ExtApi-GetBatteryInfo', () => {
if (process.env.uniTestPlatformInfo.indexOf('web') > -1) {
it('dummyTest', () => {
expect(1).toBe(1)
})
return
}
let page; let page;
let res; let res;
......
...@@ -3,6 +3,12 @@ const PAGE_PATH = ...@@ -3,6 +3,12 @@ const PAGE_PATH =
let page; let page;
describe("getElementByIdForMultipleRootNode", () => { describe("getElementByIdForMultipleRootNode", () => {
if (process.env.uniTestPlatformInfo.indexOf('web') > -1) {
it('dummyTest', () => {
expect(1).toBe(1)
})
return
}
beforeAll(async () => { beforeAll(async () => {
page = await program.reLaunch(PAGE_PATH); page = await program.reLaunch(PAGE_PATH);
await page.waitFor('view'); await page.waitFor('view');
......
...@@ -2,6 +2,12 @@ const PAGE_PATH = "/pages/API/get-element-by-id/get-element-by-id"; ...@@ -2,6 +2,12 @@ const PAGE_PATH = "/pages/API/get-element-by-id/get-element-by-id";
let page; let page;
describe("getElementById", () => { describe("getElementById", () => {
if (process.env.uniTestPlatformInfo.indexOf('web') > -1) {
it('dummyTest', () => {
expect(1).toBe(1)
})
return
}
beforeAll(async () => { beforeAll(async () => {
page = await program.reLaunch(PAGE_PATH); page = await program.reLaunch(PAGE_PATH);
await page.waitFor('view'); await page.waitFor('view');
......
...@@ -2,7 +2,12 @@ const PAGE_PATH = '/pages/API/get-file-system-manager/get-file-system-manager' ...@@ -2,7 +2,12 @@ const PAGE_PATH = '/pages/API/get-file-system-manager/get-file-system-manager'
describe('ExtApi-FileManagerTest', () => { describe('ExtApi-FileManagerTest', () => {
if (process.env.uniTestPlatformInfo.indexOf('web') > -1) {
it('dummyTest', () => {
expect(1).toBe(1)
})
return
}
let page; let page;
function getData(key = '') { function getData(key = '') {
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
uni.showToast({ uni.showToast({
title: content title: content
}) })
console.error(title, content) console.log(title, content)
} }
}, },
async dbAdd() : Promise<void> { async dbAdd() : Promise<void> {
......
describe('component-native-list-view', () => { describe('component-native-list-view', () => {
if (process.env.uniTestPlatformInfo.startsWith('android')) { if (process.env.uniTestPlatformInfo.startsWith('web')) {
it('dummyTest', async () => {
expect(1).toBe(1)
})
return
}
let page let page
beforeAll(async () => { beforeAll(async () => {
//打开list-view-multiplex测试页 //打开list-view-multiplex测试页
...@@ -13,10 +18,4 @@ describe('component-native-list-view', () => { ...@@ -13,10 +18,4 @@ describe('component-native-list-view', () => {
await page.waitFor(400) await page.waitFor(400)
await page.callMethod('listViewScrollByY', 100) await page.callMethod('listViewScrollByY', 100)
}) })
} else {
// TODO: web 端暂不支持
it('web', async () => {
expect(1).toBe(1)
})
}
}) })
describe('component-native-list-view', () => { describe('component-native-list-view', () => {
if (process.env.uniTestPlatformInfo.startsWith('android')) { if (process.env.uniTestPlatformInfo.startsWith('web')) {
it('dummyTest', async () => {
expect(1).toBe(1)
})
return
}
let page let page
beforeAll(async () => { beforeAll(async () => {
//打开list-view测试页 //打开list-view测试页
...@@ -76,10 +81,4 @@ describe('component-native-list-view', () => { ...@@ -76,10 +81,4 @@ describe('component-native-list-view', () => {
await page.callMethod('item_change_size_enum', 0) await page.callMethod('item_change_size_enum', 0)
expect(scrollLeft-1080).toBeGreaterThanOrEqual(0) expect(scrollLeft-1080).toBeGreaterThanOrEqual(0)
}) })
} else {
// TODO: web 端暂不支持
it('web', async () => {
expect(1).toBe(1)
})
}
}) })
...@@ -106,16 +106,16 @@ const pages = [ ...@@ -106,16 +106,16 @@ const pages = [
// template // template
// '/pages/template/calendar/calendar', // 动态内容 // '/pages/template/calendar/calendar', // 动态内容
'/pages/template/custom-refresher/custom-refresher', // '/pages/template/custom-refresher/custom-refresher',
'/pages/template/custom-tab-bar/custom-tab-bar', // '/pages/template/custom-tab-bar/custom-tab-bar',
// '/pages/template/drop-card/drop-card', // '/pages/template/drop-card/drop-card',
'/pages/template/half-screen/half-screen', // '/pages/template/half-screen/half-screen',
// '/pages/template/list-news/list-news', // 网络资源加载,单独测试例截图 // '/pages/template/list-news/list-news', // 网络资源加载,单独测试例截图
// '/pages/template/long-list/long-list', // 动态内容 // '/pages/template/long-list/long-list', // 动态内容
'/pages/template/navbar-lite/navbar-lite', // '/pages/template/navbar-lite/navbar-lite',
'/pages/template/pull-zoom-image/pull-zoom-image', // '/pages/template/pull-zoom-image/pull-zoom-image',
'/pages/template/scroll-fold-nav/scroll-fold-nav', // '/pages/template/scroll-fold-nav/scroll-fold-nav',
'/pages/template/scroll-sticky/scroll-sticky', // '/pages/template/scroll-sticky/scroll-sticky',
// '/pages/template/swiper-list/swiper-list', // '/pages/template/swiper-list/swiper-list',
// '/pages/template/swiper-list2/swiper-list2', // '/pages/template/swiper-list2/swiper-list2',
// '/pages/template/swiper-vertical-video/swiper-vertical-video' // '/pages/template/swiper-vertical-video/swiper-vertical-video'
...@@ -132,6 +132,13 @@ if (process.env.uniTestPlatformInfo.startsWith('android')) { ...@@ -132,6 +132,13 @@ if (process.env.uniTestPlatformInfo.startsWith('android')) {
'/pages/template/swiper-list/swiper-list', '/pages/template/swiper-list/swiper-list',
'/pages/template/swiper-list2/swiper-list2', '/pages/template/swiper-list2/swiper-list2',
'/pages/API/element-draw/element-draw', '/pages/API/element-draw/element-draw',
'/pages/template/navbar-lite/navbar-lite',
'/pages/template/pull-zoom-image/pull-zoom-image',
'/pages/template/scroll-fold-nav/scroll-fold-nav',
'/pages/template/scroll-sticky/scroll-sticky',
'/pages/template/custom-refresher/custom-refresher',
'/pages/template/custom-tab-bar/custom-tab-bar',
'/pages/template/half-screen/half-screen',
) )
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册