Tests for wait_for_change handler validation, the wgc path and text mode
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 76/100
- Type d'issue
- Fonctionnalité
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- typescript
- Domaine
- testing
Piste de recherche
Read src/tools/waitForChange.ts and the existing mocking pattern in startRecording.test.ts:45-54; run npm test to see the current test setup. Add handler tests for the validation, WGC, text mode, cleanup, keep, and cancellation cases listed in the issue, using mocked capture helpers. Done when those cases pass without relying on a live screen.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Summary
The loops behind wait_for_change are unit-tested, but the handler that wires them runs only in the capture smoke and the opt-in local test. toolLayer.test.ts skips it because it polls a live screen. Local coverage: 32.4% lines / 26.5% branches.
Where
src/tools/waitForChange.ts:108-110(mode/text mismatch),:118(wgc needs one window),:138-147(wgc size probe and temp-dir cleanup),:184-203(text mode,gone),:219-223(finallycleanup),:239-252(keep/returnImage/cancelled)src/__tests__/integration/toolLayer.test.ts:45
Impact
wait_for_change is the recommended replacement for sleeps in agent flows. A wrong elapsedSec, a leaked screencast-wait-* temp dir, or a broken text mode would not be caught on any CI leg except by the flaky Windows smoke.
Suggested fix
Handler tests with runFfmpegFrames, captureStill, readFrames and resolveCaptureTarget mocked (vi.mock, as in startRecording.test.ts:45-54):
- mode "text" without text, and text without mode: isError with the "Use text with mode" message.
- backend "wgc" with target "full": isError "watches one window".
- wgc first still probes to 0x0: isError, and no
screencast-wait-*dir left in tmpdir. - mode text, OCR finds the text: outcome "met" with matches; with
gone: true:gone: true. - grab throws mid-loop: isError, stream aborted, work dir removed.
- keep:true:
screenshotPathexists; keep:false: the temp shot is removed; cancelled: no image.
Getting started
- Relevant files:
src/tools/waitForChange.ts,src/utils/waitLoop.ts - How to run tests:
npm test
Filed by repo-audit/full-audit at b9b94fa. Severity: medium. Effort: M. audit-key: testing|src/tools/waitForChange.ts|register
- Langage dominant
- TypeScript
- Étoiles
- 1
- Forks
- 4
- Merge moyen
- 14 h 8 min
- PR mergées (30 j)
- 48
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de TMHSDigital/screencast-mcp
-
effort: small good first issue priority: medium testing
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
TMHSDigital/screencast-mcp#351 ·
Les mainteneurs répondent en général sous 1 jour
-
bug effort: small priority: medium
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
TMHSDigital/screencast-mcp#344 ·
Les mainteneurs répondent en général sous 1 jour
-
bug effort: small good first issue priority: medium
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
TMHSDigital/screencast-mcp#343 ·
Les mainteneurs répondent en général sous 1 jour
-
effort: medium priority: medium testing
Difficulté 4/5 1-2 jours Accessibilité débutants 70/100
TMHSDigital/screencast-mcp#349 ·
Les mainteneurs répondent en général sous 1 jour
-
effort: medium help wanted priority: medium testing
Difficulté 3/5 1-2 jours Accessibilité débutants 65/100
TMHSDigital/screencast-mcp#348 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de TMHSDigital/screencast-mcp
Issues similaires
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
openclaw/openclaw#200365 · 1 commentaire · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
-
area-templates triage:bot-seen triage:needs-human
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
microsoft/aspire#22356 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Archiving an agent that is not loaded keeps its old updatedAtPeut-être pris @luoph l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Les mainteneurs répondent en général sous 1 jour
-
content triage
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 1 jour