Renderer tests for keyboard shortcuts and dialogs

Offen
#95 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
76/100
Issue-Typ
Feature
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
electron, node.js, react, typescript

Rechercherichtung

Start with vitest.config.mts and the existing renderer tests under tests/renderer/**, then review mockApi.ts to see how window.vmm is provided. Add a DOM test environment and React Testing Library, following the setup patterns already used by the project. Done means renderer tests cover arrow-key focus boundaries, shortcuts being disabled for open dialogs, Delete being ignored while typing or running a VM, and Modal Esc invoking the current onClose.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

tests

The unit tests run in node without a DOM, so none of the renderer's key handling has tests. #89 only tests filterVms. Things that broke or nearly broke in review and would be worth pinning down:

  • arrows only move through the library with focus inside it (#89 review)
  • shortcuts are ignored while a dialog is open
  • Delete is ignored while typing and while the VM runs
  • Modal's Esc uses the current onClose

A jsdom (or happy-dom) project in vitest.config.mts for tests/renderer/** plus React Testing Library, with the browser mock from mockApi.ts as window.vmm, should be enough.

Vorherrschende Sprache
TypeScript
Sterne
3
Forks
0
Ø Merge
2 Min.
Gemergte PRs (30 T.)
59

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus A21-devs/Virtual-Machine-Manager

Alle Issues in A21-devs/Virtual-Machine-Manager

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.