mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-05 14:31:22 +08:00
refactor: move ios options to pkg/uixt/options
This commit is contained in:
36
pkg/uixt/ui_swipe_test.go
Normal file
36
pkg/uixt/ui_swipe_test.go
Normal file
@@ -0,0 +1,36 @@
|
||||
//go:build localtest
|
||||
|
||||
package uixt
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestAndroidSwipeAction(t *testing.T) {
|
||||
setupAndroidAdbDriver(t)
|
||||
|
||||
swipeAction := driverExt.prepareSwipeAction("up", WithDirection("down"))
|
||||
err := swipeAction(driverExt)
|
||||
checkErr(t, err)
|
||||
|
||||
swipeAction = driverExt.prepareSwipeAction("up", WithCustomDirection(0.5, 0.5, 0.5, 0.9))
|
||||
err = swipeAction(driverExt)
|
||||
checkErr(t, err)
|
||||
}
|
||||
|
||||
func TestAndroidSwipeToTapApp(t *testing.T) {
|
||||
setupAndroidAdbDriver(t)
|
||||
|
||||
err := driverExt.swipeToTapApp("抖音")
|
||||
checkErr(t, err)
|
||||
}
|
||||
|
||||
func TestAndroidSwipeToTapTexts(t *testing.T) {
|
||||
setupAndroidAdbDriver(t)
|
||||
|
||||
err := driverExt.Driver.AppLaunch("com.ss.android.ugc.aweme")
|
||||
checkErr(t, err)
|
||||
|
||||
err = driverExt.swipeToTapTexts([]string{"点击进入直播间", "直播中"}, WithDirection("up"))
|
||||
checkErr(t, err)
|
||||
}
|
||||
Reference in New Issue
Block a user