提交 afb3eac1 编写于 作者: DCloud_iOS_WZT's avatar DCloud_iOS_WZT

更正部分ext api测试用例

上级 4a124d52
...@@ -6,10 +6,10 @@ describe('ExtApi-GetAppBaseInfo', () => { ...@@ -6,10 +6,10 @@ describe('ExtApi-GetAppBaseInfo', () => {
let res; let res;
const stringProperties = [ const stringProperties = [
'appId', 'appName', 'appVersion', 'appVersionCode', 'appLanguage', 'appId', 'appName', 'appVersion', 'appVersionCode', 'appLanguage',
'language', 'uniCompileVersion', 'uniPlatform', 'uniRuntimeVersion', 'language', 'uniCompilerVersion', 'uniPlatform', 'uniRuntimeVersion',
] ]
const numberProperties = [ const numberProperties = [
'uniCompileVersionCode', 'uniRuntimeVersionCode' 'uniCompilerVersionCode', 'uniRuntimeVersionCode'
] ]
if (process.env.uniTestPlatformInfo.indexOf('web') === -1) { if (process.env.uniTestPlatformInfo.indexOf('web') === -1) {
stringProperties.push('version') stringProperties.push('version')
......
...@@ -7,14 +7,14 @@ describe('ExtApi-GetSystemInfo', () => { ...@@ -7,14 +7,14 @@ describe('ExtApi-GetSystemInfo', () => {
const stringProperties = [ const stringProperties = [
'appId', 'appLanguage', 'appName', 'appVersion', 'appVersionCode', 'appId', 'appLanguage', 'appName', 'appVersion', 'appVersionCode',
'brand', 'deviceId', 'deviceBrand', 'deviceModel', 'deviceType', 'language', 'brand', 'deviceId', 'deviceBrand', 'deviceModel', 'deviceType', 'language',
'model', 'osName', 'osVersion', 'osLanguage', 'platform', 'system', 'ua', 'uniCompileVersion', 'model', 'osName', 'osVersion', 'osLanguage', 'platform', 'system', 'ua', 'uniCompilerVersion',
'uniPlatform', 'uniRuntimeVersion', 'romName', 'romVersion', 'uniPlatform', 'uniRuntimeVersion', 'romName', 'romVersion',
] ]
const numberProperties = [ const numberProperties = [
'osAndroidAPILevel', 'devicePixelRatio', 'pixelRatio', 'screenWidth', 'screenHeight', 'statusBarHeight', 'osAndroidAPILevel', 'devicePixelRatio', 'pixelRatio', 'screenWidth', 'screenHeight', 'statusBarHeight',
'windowWidth', 'windowWidth',
'windowHeight', 'windowTop', 'windowBottom', 'screenTop', 'windowHeight', 'windowTop', 'windowBottom', 'screenTop',
'uniCompileVersionCode', 'uniRuntimeVersionCode' 'uniCompilerVersionCode', 'uniRuntimeVersionCode'
] ]
......
...@@ -18,10 +18,10 @@ describe('ExtApi-GetSystemSetting', () => { ...@@ -18,10 +18,10 @@ describe('ExtApi-GetSystemSetting', () => {
it('Check GetSystemSetting', async () => { it('Check GetSystemSetting', async () => {
for (const key in res) { for (const key in res) {
const value = res[key]; const value = res[key];
if (res['bluetoothEnabled'] == undefined) { if (res['bluetoothEnabled'] == undefined || res['bluetoothEnabled'] === false) {
expect(res['bluetoothError']).not.toBe("") expect(res['bluetoothError']).not.toBe("")
} else { } else {
expect(res['bluetoothError'] == undefined).toBe(true) expect(res['bluetoothError'] == undefined).toBe(true)
} }
if (res['wifiEnabled'] == undefined) { if (res['wifiEnabled'] == undefined) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册