Skip to content

docs: show browser test stats in the readme - #24

Merged
Andrey Lushnikov (aslushnikov) merged 1 commit into
microsoft:masterfrom
JoelEinbinder:dry-stats
Nov 20, 2019
Merged

docs: show browser test stats in the readme#24
Andrey Lushnikov (aslushnikov) merged 1 commit into
microsoft:masterfrom
JoelEinbinder:dry-stats

Conversation

@JoelEinbinder

Copy link
Copy Markdown
Contributor

No description provided.

@aslushnikov
Andrey Lushnikov (aslushnikov) merged commit 0a8d55d into microsoft:masterNov 20, 2019
Andrey Lushnikov (aslushnikov) added a commit that referenced this pull request Nov 21, 2019
This reverts test stats from the README.md
The stats now leave in a designated status page.
Sander (sand4rt) pushed a commit to sand4rt/playwright that referenced this pull request Dec 21, 2022
@Dolov狗蛋儿 (Dolov) mentioned this pull request Oct 24, 2023
1 task
Sander (sand4rt) added a commit to sand4rt/playwright that referenced this pull request Nov 4, 2023
Sander (sand4rt) added a commit to sand4rt/playwright that referenced this pull request Nov 5, 2023
Sander (sand4rt) added a commit to sand4rt/playwright that referenced this pull request Nov 5, 2023
Sander (sand4rt) added a commit to sand4rt/playwright that referenced this pull request Nov 5, 2023
2015kmadanap added a commit to Sapoto-Health/playwright-new that referenced this pull request May 28, 2026
…oto Tracer microsoft#1155 / Unit G-ops) (#6)
Adds four operational MCP CLI flags + matching env vars:
--filter-internal-urls PLAYWRIGHT_MCP_FILTER_INTERNAL_URLS
--disable-downloads PLAYWRIGHT_MCP_DISABLE_DOWNLOADS
--timeout-download <ms> PLAYWRIGHT_MCP_TIMEOUT_DOWNLOAD
--allowed-tools <list> PLAYWRIGHT_MCP_ALLOWED_TOOLS
Internal-URL filter: `file://`, `data:`, `chrome-extension://`, and the
exact hostname `localhost` (not prefix — `localhost.example.com` is a
real domain and stays visible). Reuses Unit I's `WeakSet<Page>`
persistent-hide pattern so navigating an internal-URL page to a real
URL keeps it hidden from `browser_tabs`.
Disable-downloads: skips `page.on('download')` listener registration
entirely, letting ADF's Electron-side capture stack own downloads
exclusively.
Timeout-download: tool responses block on pending downloads up to the
budget. `Download.savePromise` field stores `download.saveAs()` for the
wait; `waitForCompletion(callback)` captures `beforeCount` and calls
`_waitForPendingDownloads` with the budget.
CRITICAL deadlock-avoidance invariant (PRD user story microsoft#24):
`_waitForPendingDownloads` early-returns at the very top when
`disableDownloads` is true, BEFORE any loop or promise allocation.
Reason: when `disableDownloads=true` no `savePromise` is ever created,
so waiting on it deadlocks the tool response indefinitely. Pinned by
the Test 1 regression in `tests/mcp/download-wait.spec.ts` which
asserts <2500ms elapsed on a `--disable-downloads
--timeout-download=5000` invocation (would be 5000ms on regression).
Allowed-tools: comma-separated allowlist applied AFTER capability gate.
`--allowed-tools=browser_pdf_save` without `--caps=pdf` advertises ZERO
pdf tools — the allowlist cannot re-introduce a capability-gated tool.
CLI overrides env. Empty / unset = all tools (no regression).
Test plan:
- `opsFilters.spec.ts` — 14 pure-logic tests for `isInternalUrl()` +
`parseAllowedTools()` covering edge cases (whitespace, trailing
commas, `localhost.example.com` rejection, `about:blank` not
filtered).
- `filter-internal-urls.spec.ts` — 3 MCP integration tests including
the navigate-survives persistence regression.
- `allowed-tools.spec.ts` — 3 MCP tests for allowlist semantics,
capability-gate-first ordering, CLI-over-env precedence.
- `download-wait.spec.ts` — 3 MCP tests pinning the deadlock-avoidance
invariant + the wait-for-completion happy path + the upstream-default
no-wait fallback.
- `config-resolve.spec.ts` — 11 new wiring tests for all 4 flags + env
vars + numeric parser handling.
`npm run flint`: clean. All affected tests pass.
Part of Sapoto-Health/automatic-document-fetcher#1150. ClosesSapoto-Health/automatic-document-fetcher#1155.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@JoelEinbinder@aslushnikov