Renderer tests for keyboard shortcuts and dialogs

Abierto
#95 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
76/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
electron, node.js, react, typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
3
Forks
0
Merge medio
2 min
PR fusionados (30 d)
59

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de A21-devs/Virtual-Machine-Manager

Todos los issues de A21-devs/Virtual-Machine-Manager

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.