Add browser test suite
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- github-actions, react, typescript
- 領域
- testing-qa
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 620
- フォーク
- 16
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
FormidableLabs/use-editable のほかの issue
-
Add oxlint lintingオープン
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
FormidableLabs/use-editable#36 · コメント 1 件 · リアクション 1 件 ·
-
Identifier "b" has already been declared対応中かも @haneetsingh が 634 日前に担当しました。 オープンbug
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
FormidableLabs/use-editable#30 · コメント 3 件 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 42/100
FormidableLabs/use-editable の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
getsentry/sentry-conventions#732 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
status:in-linear status:team-assigned team:nodes
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
motiondivision/motion#3955 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
equinor/prisma-decision-web#919 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 83/100