High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.
test: add e2e guard for tab creation under fingerprint-rotate churn
Luigi Agostie372884e9d42
diff --git a/tests/e2e/scenarios/api/tab-budget-basic.sh b/tests/e2e/scenarios/api/tab-budget-basic.shnew file mode 100644index 00000000..23e334ee--- /dev/null+++ b/tests/e2e/scenarios/api/tab-budget-basic.sh@@ -0,0 +1,51 @@+#!/bin/bash++GROUP_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"+source "${GROUP_DIR}/../../helpers/api.sh"++start_test "tab budget: tab creation stays fast under fingerprint-rotate churn"++URL="${FIXTURES_URL}/index.html"+BODY="$(mktemp)"+timeouts=0+slow=0+total_navs=0++nav_once() {+ local started dur+ started=$(get_time_ms)+ e2e_curl -s -o "$BODY" -w '%{http_code}' \+ -X POST "${E2E_SERVER}/navigate" -H 'Content-Type: application/json' \+ -d "{\"url\":\"${URL}\"}" >/dev/null+ dur=$(($(get_time_ms) - started))+ total_navs=$((total_navs + 1))+ if grep -q 'did not open a new tab' "$BODY" 2>/dev/null; then+ timeouts=$((timeouts + 1))+ elif [ "$dur" -ge 8000 ]; then+ slow=$((slow + 1))+ fi+}++nav_once++for round in 1 2 3; do+ pt_post /fingerprint/rotate '{"os":"windows"}' >/dev/null 2>&1 || true+ for n in 1 2 3 4 5 6; do nav_once; done+done++rm -f "$BODY"+echo -e " ${MUTED}navigations=${total_navs} create-timeouts=${timeouts} slow(>=8s)=${slow}${NC}"++if [ "$timeouts" -eq 0 ]; then+ pass_assert "no create-tab timeouts across ${total_navs} navigations"+else+ fail_assert "${timeouts}/${total_navs} navigations hit the 10s create-tab timeout"+fi++if [ "$slow" -eq 0 ]; then+ pass_assert "no navigation stalled >= 8s"+else+ fail_assert "${slow}/${total_navs} navigations stalled >= 8s"+fi++end_testdiff --git a/tests/e2e/scenarios/manifest.json b/tests/e2e/scenarios/manifest.jsonindex 20359b49..be7173c0 100644--- a/tests/e2e/scenarios/manifest.json+++ b/tests/e2e/scenarios/manifest.json@@ -1,5 +1,12 @@{"scenarios": {+ "api/tab-budget-basic.sh": {+ "tags": [+ "tabs",+ "budget",+ "pr"+ ]+ },"api/actions-basic.sh": {"tags": ["actions",