refactor: move Call function

This commit is contained in:
lilong.129
2025-06-09 20:52:32 +08:00
parent f1544d4a5c
commit dd52faef57
5 changed files with 36 additions and 53 deletions

View File

@@ -8,7 +8,6 @@ import (
"testing"
"time"
"github.com/rs/zerolog/log"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
@@ -134,23 +133,6 @@ func TestDriver_ADB_TapXY(t *testing.T) {
assert.Nil(t, err)
}
func TestDriver_ADB_TapXY_WithHook(t *testing.T) {
driver := setupADBDriverExt(t)
err := driver.Call("pre hook", func() {
log.Info().Msg("pre hook")
}, option.WithTimeout(1))
assert.Nil(t, err)
err = driver.TapXY(0.4, 0.5)
assert.Nil(t, err)
err = driver.Call("post hook", func() {
log.Info().Msg("post hook")
}, option.WithTimeout(1))
assert.Nil(t, err)
}
func TestDriver_ADB_TapAbsXY(t *testing.T) {
driver := setupADBDriverExt(t)
err := driver.TapAbsXY(100, 300)