Renderer tests for keyboard shortcuts and dialogs

Aperta
#95 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
76/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
electron, node.js, react, typescript

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
3
Fork
0
Merge medio
2m
PR unite (30g)
59

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di A21-devs/Virtual-Machine-Manager

Tutte le issue di A21-devs/Virtual-Machine-Manager

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.