提交 91cbbabe 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

test: 处理小程序兼容问题

上级 8c6d49f3
const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
const isMP = platformInfo.startsWith('mp')
const PAGE_PATH = "/pages/API/element-takesnapshot/element-takesnapshot";
describe("element-takesnapshot", () => {
if (isMP) {
it('skip mp', () => {
expect(1).toBe(1)
})
return
}
if (process.env.uniTestPlatformInfo.indexOf('web') > -1 || process.env.UNI_AUTOMATOR_APP_WEBVIEW == 'true') {
it('dummyTest', () => {
expect(1).toBe(1)
......
const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
const isMP = platformInfo.startsWith('mp')
describe('get-native-view', () => {
if (isMP) {
it('skip mp', () => {
expect(1).toBe(1)
})
return
}
if (process.env.uniTestPlatformInfo.indexOf('web') > -1 || process.env.UNI_AUTOMATOR_APP_WEBVIEW == 'true') {
it('object', () => {
expect(1).toBe(1)
......
const PAGE_PATH =
"/pages/API/provider/provider";
const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
const isMP = platformInfo.startsWith('mp')
const PAGE_PATH = "/pages/API/provider/provider";
describe("provider", () => {
if (isMP) {
it('skip mp', () => {
expect(1).toBe(1)
})
return
}
if (process.env.uniTestPlatformInfo.indexOf('web') > -1 || process.env.UNI_AUTOMATOR_APP_WEBVIEW === 'true') {
it('web', () => {
expect(1).toBe(1)
......
const PAGE_PATH = '/pages/API/report/report'
const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
const isAndroid = platformInfo.startsWith('android')
const isMP = platformInfo.startsWith('mp')
describe('report', () => {
if (isMP) {
it('skip mp', () => {
expect(1).toBe(1)
})
return
}
let page = null
beforeAll(async () => {
page = await program.navigateTo(PAGE_PATH)
......
const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
const isMP = platformInfo.startsWith('mp')
describe('set-page-backgroundColorContent', () => {
if (isMP) {
it('skip mp', () => {
expect(1).toBe(1)
})
return
}
let page
beforeAll(async () => {
page = await program.reLaunch('/pages/API/set-page-backgroundColorContent/set-page-backgroundColorContent')
......
const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
const isMP = platformInfo.startsWith('mp')
describe('native-view.uvue', () => {
if (isMP) {
it('skip mp', () => {
expect(1).toBe(1)
})
return
}
if (process.env.uniTestPlatformInfo.indexOf('web') > -1 || process.env.UNI_AUTOMATOR_APP_WEBVIEW == 'true') {
it('object', () => {
expect(1).toBe(1)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册