File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 1224
1224
}
1225
1225
} ,
1226
1226
1227
+ /**
1228
+ * @param index
1229
+ * @param item
1230
+ */
1227
1231
downloadTest : function ( index , item ) {
1232
+ saveTextAs (
1233
+ '# APIJSON自动化回归测试-前\n主页: https://github.com/TommyLemon/APIJSON'
1234
+ + '\n\n接口: ' + ( item . version > 0 ? 'V' + item . version : 'V*' ) + ' ' + item . name
1235
+ + '\nResponse: \n' + JSON . stringify ( JSON . parse ( item . response ) , null , ' ' )
1236
+ , 'APIJSON自动化回归测试-前.txt'
1237
+ )
1238
+
1239
+ /**
1240
+ * 浏览器不允许连续下载,saveTextAs也没有回调。
1241
+ * 在第一个文本里加上第二个文本的信息?
1242
+ * beyond compare会把第一个文件的后面一段与第二个文件匹配,
1243
+ * 导致必须先删除第一个文件内的后面与第二个文件重复的一段,再重新对比。
1244
+ */
1245
+ setTimeout ( function ( ) {
1246
+ var tests = App . tests || { }
1247
+ saveTextAs (
1248
+ '# APIJSON自动化回归测试-后\n主页: https://github.com/TommyLemon/APIJSON'
1249
+ + '\n\n接口: ' + ( item . version > 0 ? 'V' + item . version : 'V*' ) + ' ' + item . name
1250
+ + '\nResponse: \n' + JSON . stringify ( JSON . parse ( tests [ item . id ] ) , null , ' ' )
1251
+ , 'APIJSON自动化回归测试-后.txt'
1252
+ )
1253
+ } , 5000 )
1228
1254
1229
1255
} ,
1230
1256
1257
+ /**
1258
+ * @param index
1259
+ * @param item
1260
+ */
1231
1261
handleTest : function ( right , index , item ) {
1232
1262
if ( right ) {
1233
1263
var tests = App . tests || { }
You can’t perform that action at this time.
0 commit comments