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