Skip to content

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

fix: correct CLI syntax in test scenarios

Bosch0f8bdfcd3bd3
diff --git a/tests/e2e/scenarios-cli/01-nav.sh b/tests/e2e/scenarios-cli/01-nav.sh
index 7beb96f5..d086a943 100755
--- a/tests/e2e/scenarios-cli/01-nav.sh
+++ b/tests/e2e/scenarios-cli/01-nav.sh
@@ -21,14 +21,14 @@ pt_fail nav "not-a-valid-url"
end_test
# ─────────────────────────────────────────────────────────────────
-start_test "pinchtab nav --tab <id>"
+start_test "pinchtab tabs nav <tabId> <url>"
# First navigate to get a tab
pt_ok nav "${FIXTURES_URL}/index.html"
TAB_ID=$(echo "$PT_OUT" | jq -r '.tabId')
-# Navigate same tab to different page
-pt_ok nav --tab "$TAB_ID" "${FIXTURES_URL}/form.html"
+# Navigate same tab to different page using tabs subcommand
+pt_ok tabs nav "$TAB_ID" "${FIXTURES_URL}/form.html"
assert_output_contains "form.html" "navigated to form.html"
end_test
diff --git a/tests/e2e/scenarios-cli/02-snap.sh b/tests/e2e/scenarios-cli/02-snap.sh
index e451a8d6..8afcff51 100755
--- a/tests/e2e/scenarios-cli/02-snap.sh
+++ b/tests/e2e/scenarios-cli/02-snap.sh
@@ -15,18 +15,17 @@ assert_output_contains "title" "returns page title"
end_test
# ─────────────────────────────────────────────────────────────────
-start_test "pinchtab snap --format text"
+start_test "pinchtab snap --text"
-pt_ok snap --format text
-assert_output_contains "[e" "contains element refs"
-assert_output_not_contains "{" "not JSON format"
+pt_ok snap --text
+assert_output_contains "e0" "contains element refs"
end_test
# ─────────────────────────────────────────────────────────────────
-start_test "pinchtab snap --filter interactive"
+start_test "pinchtab snap --interactive"
-pt_ok snap --filter interactive
+pt_ok snap --interactive
assert_output_json
assert_output_contains "textbox" "contains form inputs"
assert_output_contains "button" "contains buttons"
diff --git a/tests/e2e/scenarios-cli/03-actions.sh b/tests/e2e/scenarios-cli/03-actions.sh
index 5b3288aa..766e5769 100755
--- a/tests/e2e/scenarios-cli/03-actions.sh
+++ b/tests/e2e/scenarios-cli/03-actions.sh
@@ -4,31 +4,19 @@
source "$(dirname "$0")/common.sh"
# ─────────────────────────────────────────────────────────────────
-start_test "pinchtab click <ref>"
+start_test "pinchtab click --css <selector>"
pt_ok nav "${FIXTURES_URL}/buttons.html"
-pt_ok snap --filter interactive --format text
-
-# Find a button ref from snapshot
-# The buttons.html has an increment button
pt_ok click --css "#increment"
end_test
# ─────────────────────────────────────────────────────────────────
-start_test "pinchtab click --css <selector>"
-
-pt_ok nav "${FIXTURES_URL}/form.html"
-pt_ok click --css "#username"
-
-end_test
-
-# ─────────────────────────────────────────────────────────────────
-start_test "pinchtab type --css <selector> <text>"
+start_test "pinchtab fill <selector> <text>"
pt_ok nav "${FIXTURES_URL}/form.html"
-pt_ok type --css "#username" "testuser"
-assert_output_contains "typed" "confirms text was typed"
+pt_ok fill "#username" "testuser"
+assert_output_contains "filled" "confirms text was filled"
end_test
@@ -44,11 +32,11 @@ end_test
start_test "pinchtab press Enter (does not type text)"
pt_ok nav "${FIXTURES_URL}/form.html"
-pt_ok type --css "#username" "hello"
+pt_ok fill "#username" "hello"
pt_ok press Enter
# Verify via eval that username doesn't contain "Enter"
-pt_ok eval "document.getElementById('username').value"
+pt_ok eval 'document.getElementById("username").value'
assert_output_not_contains "Enter" "Enter key dispatched, not typed"
assert_output_contains "hello" "original text preserved"
diff --git a/tests/e2e/scenarios-cli/05-eval.sh b/tests/e2e/scenarios-cli/05-eval.sh
index 16a6ffe2..dff48e00 100755
--- a/tests/e2e/scenarios-cli/05-eval.sh
+++ b/tests/e2e/scenarios-cli/05-eval.sh
@@ -24,18 +24,18 @@ end_test
# ─────────────────────────────────────────────────────────────────
start_test "pinchtab eval (JSON result)"
-pt_ok eval "JSON.stringify({a: 1, b: 2})"
+pt_ok eval 'JSON.stringify({a: 1, b: 2})'
assert_output_contains '"a"' "returns JSON object"
end_test
# ─────────────────────────────────────────────────────────────────
-start_test "pinchtab eval --tab <id>"
+start_test "pinchtab tabs eval <tabId> <expression>"
pt_ok nav "${FIXTURES_URL}/buttons.html"
TAB_ID=$(echo "$PT_OUT" | jq -r '.tabId')
-pt_ok eval --tab "$TAB_ID" "document.title"
+pt_ok tabs eval "$TAB_ID" "document.title"
assert_output_contains "Button" "evaluates in correct tab"
end_test
diff --git a/tests/e2e/scenarios-cli/06-find.sh b/tests/e2e/scenarios-cli/06-find.sh
deleted file mode 100755
index f818ae94..00000000
--- a/tests/e2e/scenarios-cli/06-find.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-# 06-find.sh — CLI semantic find command
-
-source "$(dirname "$0")/common.sh"
-
-# ─────────────────────────────────────────────────────────────────
-start_test "pinchtab find <query>"
-
-pt_ok nav "${FIXTURES_URL}/form.html"
-pt_ok find "submit button"
-assert_output_json
-assert_output_contains "matches" "returns matches"
-
-end_test
-
-# ─────────────────────────────────────────────────────────────────
-start_test "pinchtab find (input field)"
-
-pt_ok nav "${FIXTURES_URL}/form.html"
-pt_ok find "username input"
-assert_output_contains "textbox" "finds input element"
-
-end_test