in-browser-testing
БесплатноБез исполняемых скриптовНе проверенUse when verifying NimbusImage changes in a live browser tab (localhost:5173) — clicking UI, driving drawing tools, reading store state from the console…
от arjunrajlaboratory★ 22 звезды на GitHubОб этом скилле
In-Browser Testing of NimbusImage
Overview
Multiple real bugs in this repo passed tsc, lint, all unit tests, and code reasoning — and only broke in the live app (pointer-events layering, deep-watch over-firing, HMR-corrupted store, background-tab false-passes). For any user-facing change, in-browser verification is a required gate, and it must be done in a way that can actually fail. The traps below each produced a false "it works" at least once.
The six false-pass traps
Synthetic clicks lie.
element.dispatchEvent(new MouseEvent('click'))bypasses hit-testing,pointer-events, z-index, and overlays. A synthetic-click walkthrough once reported a tour "working" while real user clicks did nothing. Verify clickability withdocument.elementFromPoint(cx, cy)(is the intended element the topmost hit target?), then click with the realcomputertool. Reserve synthetic dispatch for driving flows fast only after clickability is independently confirmed.Background tabs lie. A hidden tab pauses
requestAnimationFrame, throttlessetTimeoutto ~1 Hz, and never composites — perf probes report 0 long tasks and event loops stall/time out. The tab must be foreground/visible for any timing or rendering claim. If a paced loop must survive a background tab, use busy-wait gaps (while (performance.now() < end) {}), not setTimeout.A stale store lies. Editing any
src/store/*.tswhilepnpm run devruns breaks HMR ([vuex] duplicate getter key, annotations stuck at 0). Hard-reload the page after every store-module edit before trusting anything. (Component.vueedits HMR fine.)A stale backend lies. After backend plugin edits,
docker compose restart girderdoes NOT load the new code (plugin is baked into the image) — new routes 404 while tox passes. Rebuild:docker compose build girder && docker compose up -d girder.Screenshots lie about the image itself. The tile layers are WebGL canvases without
preserveDrawingBuffer, so a captured screenshot can show the image area solid black while the page renders it normally for the user — DOM overlays in the same shot look fine, which makes it read as "the image failed to load". Don't debug that; confirm pixels through GeoJS's own compositing instead:const dataUrl = await map.screenshot(undefined, 'image/png'); // re-renders into a 2D canvas // draw to an offscreen canvas, then getImageData → report max/mean channel valueA non-zero max means the tiles are there. Note that a fluorescence dataset is legitimately near-black at fit-to-view zoom (sparse bright cells,
hist.maxpinned to 65535 by a few saturated pixels), so a low mean is not evidence of a bug either. Verify tile health fromstatusCodes inread_network_requests(/tiles/zxy/→ 200) plus the layers'idle/_imageUrls, and verify overlays from live DOM state — not from the picture.An empty console reads as "clean" when it means "not capturing."
read_console_messagesonly records from the moment it is first called, so a warning emitted during app boot is invisible unless you call it then reload then read. Worse, aconsole.warnwrapper installed viajavascript_toolcan never see boot-time output at all — the app has already mounted by the time you can install it. Chasing a missing[Vuetify UPGRADE]warning this way produced two false passes in a row (issue #1281) before the order was fixed.Compounding it:
eagerdialogs mount at app boot, and a mount-time warning fires exactly once.PipelineDialog.vuesetseagerso its content stays mounted while closed — so closing and reopening the dialog does not re-run any child'ssetup(), and any one-shot warning there (Vuetify deprecations, prop validators) never fires again for the life of the page. Toggling the dialog to "re-trigger" it silently measures nothing.Working order for any boot-time console assertion:
1. read_console_messages{clear:true} // start tracking / empty the buffer 2. location.reload() // via javascript_tool; a #hash nav is NOT a reload 3. wait for boot (poll store state) 4. read_console_messages{pattern:…} // the real read 5. read again with a broad pattern (e.g. "vite") to prove capture is live — seeing "[vite] connected" is what makes an empty filtered result meaningfulThen invert it: put the pre-fix code back (
git stash) and confirm the same sequence does report the warning. Verify which code is actually being served rather than assuming the stash took effect —fetch('/src/path/To.vue?t=' + Date.now())returns Vite's current transform, and counting tokens in it (densevscomfortable) settles it. Rendered DOM often can't:denseanddensity="comfortable"produce the samev-row--density-comfortableclass, so the DOM looked identical in both states.
Console handles (javascript_tool)
// Wrap EVERYTHING in an IIFE — top-level
Установить in-browser-testing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл in-browser-testing?
Use when verifying NimbusImage changes in a live browser tab (localhost:5173) — clicking UI, driving drawing tools, reading store state from the console, measuring render performance, or reproducing a reported UI bug. Use BEFORE claiming any user-facing change works: tsc/lint/vitest green does not mean the UI works.
Как установить скилл in-browser-testing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл in-browser-testing запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic