Skip to content

High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.

fix(test): update scroll test to expect int not string

Bosch68b128001ee1
diff --git a/cmd/pinchtab/cmd_cli_test.go b/cmd/pinchtab/cmd_cli_test.go
index b61a8226..3298520c 100644
--- a/cmd/pinchtab/cmd_cli_test.go
+++ b/cmd/pinchtab/cmd_cli_test.go
@@ -377,12 +377,19 @@ func TestCLIScroll(t *testing.T) {
t.Errorf("expected ref=e20, got %v", body["ref"])
}
- // Scroll by pixels
+ // Scroll by pixels (now sends int, not string)
cliAction(client, m.base(), "", "scroll", []string{"800"})
_ = json.Unmarshal([]byte(m.lastBody), &body)
- if body["scrollY"] != "800" {
+ if body["scrollY"] != float64(800) { // JSON unmarshals numbers as float64
t.Errorf("expected scrollY=800, got %v", body["scrollY"])
}
+
+ // Scroll by direction
+ cliAction(client, m.base(), "", "scroll", []string{"down"})
+ _ = json.Unmarshal([]byte(m.lastBody), &body)
+ if body["direction"] != "down" {
+ t.Errorf("expected direction=down, got %v", body["direction"])
+ }
}
func TestCLISelect(t *testing.T) {