refactor: rename options pkg to option

This commit is contained in:
lilong.129
2025-02-06 17:08:25 +08:00
parent b22f24cb6b
commit 194b61718f
61 changed files with 554 additions and 548 deletions

View File

@@ -4,7 +4,7 @@ import (
"testing"
hrp "github.com/httprunner/httprunner/v5"
"github.com/httprunner/httprunner/v5/pkg/uixt/options"
"github.com/httprunner/httprunner/v5/pkg/uixt/option"
)
func TestAndroidDouyinE2E(t *testing.T) {
@@ -15,8 +15,8 @@ func TestAndroidDouyinE2E(t *testing.T) {
"ups": "${ENV(LIVEUPLIST)}",
}).
SetAndroid(
options.WithSerialNumber("$device"),
options.WithAdbLogOn(true)),
option.WithSerialNumber("$device"),
option.WithAdbLogOn(true)),
TestSteps: []hrp.IStep{
hrp.NewStep("启动抖音").
Android().
@@ -25,8 +25,8 @@ func TestAndroidDouyinE2E(t *testing.T) {
Home().
SwipeToTapApp(
"抖音",
options.WithMaxRetryTimes(5),
options.WithTapOffset(0, -50),
option.WithMaxRetryTimes(5),
option.WithTapOffset(0, -50),
).
Sleep(20).
Validate().
@@ -47,11 +47,11 @@ func TestAndroidDouyinE2E(t *testing.T) {
Android().
TapByOCR(
"直播中",
options.WithIgnoreNotFoundError(true),
options.WithIndex(-1),
option.WithIgnoreNotFoundError(true),
option.WithIndex(-1),
).
EndToEndDelay(options.WithInterval(5), options.WithTimeout(120)).
TapByUITypes(options.WithScreenShotUITypes("close")),
EndToEndDelay(option.WithInterval(5), option.WithTimeout(120)).
TapByUITypes(option.WithScreenShotUITypes("close")),
},
}