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

auto test source update

上级 d07eaf16
{
"name" : "uni-api",
"appid" : "__UNI__ED9218B",
"appid" : "__UNI__6EEB705",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
......
......@@ -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": {
......
......@@ -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,
/**
......
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册