refactor: move server models to uixt/types

This commit is contained in:
lilong.129
2025-05-20 14:21:18 +08:00
parent 2f48a92f7f
commit 5066c64368
6 changed files with 52 additions and 29 deletions

View File

@@ -8,6 +8,7 @@ import (
"net/http/httptest"
"testing"
"github.com/httprunner/httprunner/v5/uixt/types"
"github.com/stretchr/testify/assert"
)
@@ -17,14 +18,14 @@ func TestTapHandler(t *testing.T) {
tests := []struct {
name string
path string
tapReq TapRequest
tapReq types.TapRequest
wantStatus int
wantResp HttpResponse
}{
{
name: "tap abs xy",
path: fmt.Sprintf("/api/v1/android/%s/ui/tap", "4622ca24"),
tapReq: TapRequest{
tapReq: types.TapRequest{
X: 500,
Y: 800,
Duration: 0,
@@ -39,7 +40,7 @@ func TestTapHandler(t *testing.T) {
{
name: "tap relative xy",
path: fmt.Sprintf("/api/v1/android/%s/ui/tap", "4622ca24"),
tapReq: TapRequest{
tapReq: types.TapRequest{
X: 0.5,
Y: 0.6,
Duration: 0,