diff --git a/manifest.json b/manifest.json index 226056a97efa85849b8da6d5b315e082290d2849..652000055cf543520f94fbf2ac379143b6483de5 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name" : "uni-api", - "appid" : "__UNI__ED9218B", + "appid" : "__UNI__6EEB705", "description" : "", "versionName" : "1.0.0", "versionCode" : "100", diff --git a/pages.json b/pages.json index 03593a5134d2ce1ba18df7c56fbd8008137e78e5..24f82b827fe2c372169caf32fe7b9b2b28fa4037 100644 --- a/pages.json +++ b/pages.json @@ -5,27 +5,6 @@ "style": { "navigationBarTitleText": "uni-app" } - }, - { - "path": "pages/autotest/uni-getbatteryinfo/uni-getbatteryinfo", - "style": { - "navigationBarTitleText": "uni-getbatteryinfo", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/autotest/uni-memorywarning/uni-memorywarning", - "style": { - "navigationBarTitleText": "uni-memorywarning", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/autotest/uni-usercapturescreen/uni-usercapturescreen", - "style": { - "navigationBarTitleText": "uni-usercapturescreen", - "enablePullDownRefresh": false - } } ], "globalStyle": { diff --git a/uni_modules/uni-wifi/utssdk/interface.uts b/uni_modules/uni-wifi/utssdk/interface.uts index 86d91fdbd798cc2db376e6d3b0ea21e77ce7708e..c2a2767570171c3bd95d715a46c675f30a547078 100644 --- a/uni_modules/uni-wifi/utssdk/interface.uts +++ b/uni_modules/uni-wifi/utssdk/interface.uts @@ -99,6 +99,7 @@ interface Uni { * } * @uniVersion 3.7.7 * @uniVueVersion 2,3 //支持的vue版本 + * @autotest { after: 'stopWifi' } */ startWifi : StartWifi, /** @@ -122,6 +123,7 @@ interface Uni { * } * @uniVersion 3.7.7 * @uniVueVersion 2,3 //支持的vue版本 + * @autotest { before: 'startWifi' } */ stopWifi : StopWifi, /** @@ -130,7 +132,7 @@ interface Uni { * @uniPlatform { * "app": { * "android": { - * "osVer": "<=10.0", + * "osVer": ">=4.4 && <10.0", * "uniVer": "3.7.0", * "unixVer": "3.9.0" * }, @@ -184,15 +186,7 @@ interface Uni { * } * @uniVersion 3.7.7 * @uniVueVersion 2,3 //支持的vue版本 - * @autotest { - generated: false, - cases:[ - { - before: 'startWifi', - after: 'stopWifi' - } - ] - } + * @autotest { before: 'startWifi', after: 'stopWifi' } */ getWifiList : GetWifiList, /** @@ -216,6 +210,23 @@ interface Uni { * } * @uniVersion 3.7.7 * @uniVueVersion 2,3 //支持的vue版本 + * @autotest { expectCallback: true } + * @autotest { + generated: false, + pollution: false, + expectCallback: true, + before: 'startWifi', + after: 'onGetWifiListAfter', + cases: [ + { + output: { + value: 0, + returnKey: '.wifiList.length', + jestExpectSyntax: 'toBeGreaterThan' + }, + } + ] + } */ onGetWifiList : OnGetWifiList, /** diff --git a/uni_modules/uni-wifi/utssdk/uni.autotest.js b/uni_modules/uni-wifi/utssdk/uni.autotest.js index 7889e3cb83e7be1d2c72eb0b25716410693bd6f5..156387e218825742f64260e556bfa3120c8b3d39 100644 --- a/uni_modules/uni-wifi/utssdk/uni.autotest.js +++ b/uni_modules/uni-wifi/utssdk/uni.autotest.js @@ -21,9 +21,23 @@ export function stopWifi() { resolve() }, fail: () => { - console.log('stopWifi success'); - fail() + console.log('stopWifi fail'); + reject() } }) }) } + +export function onGetWifiListAfter() { + return new Promise((resolve, reject) => { + uni.getWifiList({ + success() { + setTimeout(resolve, 500) + }, + fail: reject, + complete() { + stopWifi() + } + }) + }) +} \ No newline at end of file