提交 6c1277df 编写于 作者: 杜庆泉's avatar 杜庆泉

auto test source update

上级 d07eaf16
{ {
"name" : "uni-api", "name" : "uni-api",
"appid" : "__UNI__ED9218B", "appid" : "__UNI__6EEB705",
"description" : "", "description" : "",
"versionName" : "1.0.0", "versionName" : "1.0.0",
"versionCode" : "100", "versionCode" : "100",
......
...@@ -5,27 +5,6 @@ ...@@ -5,27 +5,6 @@
"style": { "style": {
"navigationBarTitleText": "uni-app" "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": { "globalStyle": {
......
...@@ -99,6 +99,7 @@ interface Uni { ...@@ -99,6 +99,7 @@ interface Uni {
* } * }
* @uniVersion 3.7.7 * @uniVersion 3.7.7
* @uniVueVersion 2,3 //支持的vue版本 * @uniVueVersion 2,3 //支持的vue版本
* @autotest { after: 'stopWifi' }
*/ */
startWifi : StartWifi, startWifi : StartWifi,
/** /**
...@@ -122,6 +123,7 @@ interface Uni { ...@@ -122,6 +123,7 @@ interface Uni {
* } * }
* @uniVersion 3.7.7 * @uniVersion 3.7.7
* @uniVueVersion 2,3 //支持的vue版本 * @uniVueVersion 2,3 //支持的vue版本
* @autotest { before: 'startWifi' }
*/ */
stopWifi : StopWifi, stopWifi : StopWifi,
/** /**
...@@ -130,7 +132,7 @@ interface Uni { ...@@ -130,7 +132,7 @@ interface Uni {
* @uniPlatform { * @uniPlatform {
* "app": { * "app": {
* "android": { * "android": {
* "osVer": "<=10.0", * "osVer": ">=4.4 && <10.0",
* "uniVer": "3.7.0", * "uniVer": "3.7.0",
* "unixVer": "3.9.0" * "unixVer": "3.9.0"
* }, * },
...@@ -184,15 +186,7 @@ interface Uni { ...@@ -184,15 +186,7 @@ interface Uni {
* } * }
* @uniVersion 3.7.7 * @uniVersion 3.7.7
* @uniVueVersion 2,3 //支持的vue版本 * @uniVueVersion 2,3 //支持的vue版本
* @autotest { * @autotest { before: 'startWifi', after: 'stopWifi' }
generated: false,
cases:[
{
before: 'startWifi',
after: 'stopWifi'
}
]
}
*/ */
getWifiList : GetWifiList, getWifiList : GetWifiList,
/** /**
...@@ -216,6 +210,23 @@ interface Uni { ...@@ -216,6 +210,23 @@ interface Uni {
* } * }
* @uniVersion 3.7.7 * @uniVersion 3.7.7
* @uniVueVersion 2,3 //支持的vue版本 * @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, onGetWifiList : OnGetWifiList,
/** /**
......
...@@ -21,9 +21,23 @@ export function stopWifi() { ...@@ -21,9 +21,23 @@ export function stopWifi() {
resolve() resolve()
}, },
fail: () => { fail: () => {
console.log('stopWifi success'); console.log('stopWifi fail');
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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册