mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 23:51:25 +08:00
fix: 修复移动端步骤包含 validate 时验证器不执行的问题
This commit is contained in:
@@ -1 +1 @@
|
|||||||
v5.0.0-beta-2506062217
|
v5.0.0-beta-2506062218
|
||||||
|
|||||||
+56
-17
@@ -237,26 +237,65 @@ func (tc *TestCaseDef) loadISteps() (*TestCase, error) {
|
|||||||
WebSocket: step.WebSocket,
|
WebSocket: step.WebSocket,
|
||||||
})
|
})
|
||||||
} else if step.IOS != nil {
|
} else if step.IOS != nil {
|
||||||
testCase.TestSteps = append(testCase.TestSteps, &StepMobile{
|
if len(step.Validators) > 0 {
|
||||||
StepConfig: step.StepConfig,
|
testCase.TestSteps = append(testCase.TestSteps, &StepMobileUIValidation{
|
||||||
IOS: step.IOS,
|
StepMobile: &StepMobile{
|
||||||
})
|
StepConfig: step.StepConfig,
|
||||||
|
IOS: step.IOS,
|
||||||
|
},
|
||||||
|
Validators: step.Validators,
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
testCase.TestSteps = append(testCase.TestSteps, &StepMobile{
|
||||||
|
StepConfig: step.StepConfig,
|
||||||
|
IOS: step.IOS,
|
||||||
|
})
|
||||||
|
}
|
||||||
} else if step.Harmony != nil {
|
} else if step.Harmony != nil {
|
||||||
testCase.TestSteps = append(testCase.TestSteps, &StepMobile{
|
if len(step.Validators) > 0 {
|
||||||
StepConfig: step.StepConfig,
|
testCase.TestSteps = append(testCase.TestSteps, &StepMobileUIValidation{
|
||||||
Harmony: step.Harmony,
|
StepMobile: &StepMobile{
|
||||||
})
|
StepConfig: step.StepConfig,
|
||||||
|
Harmony: step.Harmony,
|
||||||
|
},
|
||||||
|
Validators: step.Validators,
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
testCase.TestSteps = append(testCase.TestSteps, &StepMobile{
|
||||||
|
StepConfig: step.StepConfig,
|
||||||
|
Harmony: step.Harmony,
|
||||||
|
})
|
||||||
|
}
|
||||||
} else if step.Android != nil {
|
} else if step.Android != nil {
|
||||||
testCase.TestSteps = append(testCase.TestSteps, &StepMobile{
|
if len(step.Validators) > 0 {
|
||||||
StepConfig: step.StepConfig,
|
testCase.TestSteps = append(testCase.TestSteps, &StepMobileUIValidation{
|
||||||
Android: step.Android,
|
StepMobile: &StepMobile{
|
||||||
})
|
StepConfig: step.StepConfig,
|
||||||
|
Android: step.Android,
|
||||||
|
},
|
||||||
|
Validators: step.Validators,
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
testCase.TestSteps = append(testCase.TestSteps, &StepMobile{
|
||||||
|
StepConfig: step.StepConfig,
|
||||||
|
Android: step.Android,
|
||||||
|
})
|
||||||
|
}
|
||||||
} else if step.Browser != nil {
|
} else if step.Browser != nil {
|
||||||
testCase.TestSteps = append(testCase.TestSteps, &StepMobile{
|
if len(step.Validators) > 0 {
|
||||||
StepConfig: step.StepConfig,
|
testCase.TestSteps = append(testCase.TestSteps, &StepMobileUIValidation{
|
||||||
Browser: step.Browser,
|
StepMobile: &StepMobile{
|
||||||
})
|
StepConfig: step.StepConfig,
|
||||||
|
Browser: step.Browser,
|
||||||
|
},
|
||||||
|
Validators: step.Validators,
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
testCase.TestSteps = append(testCase.TestSteps, &StepMobile{
|
||||||
|
StepConfig: step.StepConfig,
|
||||||
|
Browser: step.Browser,
|
||||||
|
})
|
||||||
|
}
|
||||||
} else if step.Shell != nil {
|
} else if step.Shell != nil {
|
||||||
testCase.TestSteps = append(testCase.TestSteps, &StepShell{
|
testCase.TestSteps = append(testCase.TestSteps, &StepShell{
|
||||||
StepConfig: step.StepConfig,
|
StepConfig: step.StepConfig,
|
||||||
|
|||||||
Reference in New Issue
Block a user