fix: keep compatibility for config ignore_popup

This commit is contained in:
lilong.129
2025-07-21 22:00:48 +08:00
parent fbca5907c9
commit 9c4a945db6
6 changed files with 32 additions and 9 deletions

View File

@@ -1077,6 +1077,24 @@ func (r *SessionRunner) GetTransactions() map[string]map[TransactionType]time.Ti
return r.transactions
}
// keep for compatibility
func (r *SessionRunner) ignorePopup(osType string) bool {
config := r.caseRunner.TestCase.Config.Get()
if osType == string(StepTypeAndroid) && len(config.Android) > 0 {
return config.Android[0].IgnorePopup
}
if osType == string(StepTypeIOS) && len(config.IOS) > 0 {
return config.IOS[0].IgnorePopup
}
if osType == string(StepTypeHarmony) && len(config.Harmony) > 0 {
return config.Harmony[0].IgnorePopup
}
if osType == string(stepTypeBrowser) && len(config.Browser) > 0 {
return config.Browser[0].IgnorePopup
}
return false
}
// saveJSONCase saves the original JSON case content to the results directory
func saveJSONCase(casePath string) error {
// Read the original JSON case content