Add browser test suite
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- github-actions, react, typescript
- Área
- testing-qa
Línea de trabajo
Start with the hook source and the contentEditable editing paths it drives, then copy the browser-test setup from react-live (vitest.browser.mts and its stories/ folder). Add the npm run test script, keep it out of npm run check, and add a CI job that installs Chromium and runs the suite on the React 18.0.0 leg. Done when the checklist items are covered, the caret regression test for #37 passes, and CONTRIBUTING.md explains how to run the suite.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
use-editable has no tests. Add a browser test suite, following react-live's setup (vitest + @vitest/browser-playwright, stories run in real Chromium).
jsdom can't stand in here: it has no contentEditable editing model, so typing, selection, and caret behavior have to be exercised in a real browser.
Coverage to aim for
- Typing: characters land in the right place, and
onChangereceives the right text andPosition - Caret position: preserved across re-renders, including an unrelated parent re-render mid-keystroke (regression test for #37)
- Undo / redo: Cmd/Ctrl+Z and Shift+Cmd/Ctrl+Z history
- Indentation:
opts.indentationTab/Shift+Tab and backspace behavior -
EditAPI:update,insert(including negative offsets),move(offset and{ row, column }),getState -
opts.disabled: toggling it on and off - Line breaks: Enter,
<br>handling, trailing newline
Setup
- vitest browser config + Playwright Chromium (see react-live's
vitest.browser.mtsandstories/) -
npm run testscript (kept out ofnpm run check, like react-live, so the main check stays fast) - CI job that installs Chromium and runs the suite, including the React 18.0.0 compat leg
- Document in CONTRIBUTING.md
Related: #38 (oxlint). Its hooks-order fix would benefit from these tests landing first.
- Lenguaje dominante
- TypeScript
- Estrellas
- 620
- Forks
- 16
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de FormidableLabs/use-editable
-
Add oxlint lintingAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 52/100
-
cmd + / Keyboard ShortcutAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
FormidableLabs/use-editable#36 · 1 comentario · 1 reacción ·
-
Identifier "b" has already been declaredPosiblemente ocupada @haneetsingh la tomó hace 637 días. Abiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
-
Defocus every first typingAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
FormidableLabs/use-editable#30 · 3 comentarios · 1 reacción ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 42/100
Todos los issues de FormidableLabs/use-editable
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 76/100
logto-io/logto#9837 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Dificultad 1/5 Menos de una hora Aptitud para principiantes 76/100
lingdojo/kana-dojo#32964 · 1 comentario · 5 reacciones ·
Los mantenedores suelen responder en 1 día
-
Documentation status: needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
mastra-ai/mastra#28194 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
priority-low refactor-3
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 3 días