Skip to content

Commit a9c0e18

Browse files
committed
解决零代码回归测试 切换机器学习与前后对比、调整分页/搜索等筛选条件 后断言报告统计数量翻倍
1 parent b5517a7 commit a9c0e18

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

js/main.js

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5837,13 +5837,17 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
58375837
this.saveCache(this.server, 'testCasePage', this.testCasePage)
58385838
this.saveCache(this.server, 'testCaseCount', this.testCaseCount)
58395839

5840+
this.resetTestCount(this.currentAccountIndex)
5841+
58405842
this.remotes = null
58415843
this.showTestCase(true, false)
58425844
break
58435845
case 'random':
58445846
this.saveCache(this.server, 'randomPage', this.randomPage)
58455847
this.saveCache(this.server, 'randomCount', this.randomCount)
58465848

5849+
this.resetTestCount(this.currentAccountIndex, true)
5850+
58475851
var cri = this.currentRemoteItem || {}
58485852
cri.randoms = null
58495853
this.randoms = null
@@ -5853,6 +5857,8 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
58535857
this.saveCache(this.server, 'randomSubPage', this.randomSubPage)
58545858
this.saveCache(this.server, 'randomSubCount', this.randomSubCount)
58555859

5860+
this.resetTestCount(this.currentAccountIndex, true, true)
5861+
58565862
var cri = this.currentRandomItem || {}
58575863
this.randomSubs = null
58585864
this.showRandomList(true, cri.Random, true)
@@ -6952,11 +6958,29 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
69526958
// this.isEnvCompareEnabled = false
69536959
// this.saveCache(this.server, 'isEnvCompareEnabled', this.isEnvCompareEnabled)
69546960
// }
6961+
6962+
this.resetTestCount(this.currentAccountIndex)
6963+
69556964
this.remotes = null
69566965
this.showTestCase(true, false)
69576966
},
69586967

6959-
onClickTestScript() {
6968+
resetTestCount: function (accountIndex, isRandom, isSub) {
6969+
if (isRandom) {
6970+
this.resetCount(isSub ? this.currentRandomItem : this.currentRemoteItem, isRandom, accountIndex)
6971+
return
6972+
}
6973+
6974+
if (accountIndex == -1) {
6975+
this.logoutSummary = this.resetCount(this.logoutSummary, false, accountIndex)
6976+
}
6977+
else if (accountIndex >= 0 && accountIndex < (this.accounts || []).length) {
6978+
var accountItem = this.resetCount(this.getSummary(accountIndex), false, accountIndex)
6979+
this.accounts[accountIndex] = accountItem
6980+
}
6981+
},
6982+
6983+
onClickTestScript: function () {
69606984
var logger = console.log
69616985
console.log = function(msg) {
69626986
logger(msg)

0 commit comments

Comments
 (0)