mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-08 08:57:40 +08:00
fix: unittest
This commit is contained in:
@@ -217,7 +217,9 @@ func (dExt *XTDriver) AIAction(ctx context.Context, prompt string, opts ...optio
|
|||||||
ScreenshotElapsed: screenResult.Elapsed,
|
ScreenshotElapsed: screenResult.Elapsed,
|
||||||
ImagePath: screenResult.ImagePath,
|
ImagePath: screenResult.ImagePath,
|
||||||
Resolution: &screenResult.Resolution,
|
Resolution: &screenResult.Resolution,
|
||||||
PlanningResult: &planningResult.PlanningResult,
|
}
|
||||||
|
if planningResult != nil {
|
||||||
|
aiExecutionResult.PlanningResult = &planningResult.PlanningResult
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
aiExecutionResult.Error = err.Error()
|
aiExecutionResult.Error = err.Error()
|
||||||
|
|||||||
@@ -314,7 +314,7 @@ func TestDriverExt_AIAction_CompareWithAIAction(t *testing.T) {
|
|||||||
if aiResult.PlanningResult != nil {
|
if aiResult.PlanningResult != nil {
|
||||||
t.Logf("AIAction model: %s", aiResult.PlanningResult.ModelName)
|
t.Logf("AIAction model: %s", aiResult.PlanningResult.ModelName)
|
||||||
|
|
||||||
assert.NotEqual(t, "wings-api", aiResult.PlanningResult.ModelName, "AIAction should not use wings-api")
|
assert.Equal(t, "wings-api", aiResult.PlanningResult.ModelName, "AIAction should use wings-api")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user