diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-12-07 23:47:35 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-12-07 23:47:35 +0900 |
| commit | 3cfa0f5c029113a2ada8e8663767a654150ba8c3 (patch) | |
| tree | 0ed8b65c4283079260cadd509e5f68733479a689 /src/client/pages/HomePage.test.tsx | |
| parent | f0635f9beb0ff85bbea2264a1b19160f0beed257 (diff) | |
| download | kioku-3cfa0f5c029113a2ada8e8663767a654150ba8c3.tar.gz kioku-3cfa0f5c029113a2ada8e8663767a654150ba8c3.tar.zst kioku-3cfa0f5c029113a2ada8e8663767a654150ba8c3.zip | |
chore: fix all lint errors and warnings
- Remove unused imports in repositories.ts and sync.test.ts
- Replace non-null assertions with type casts in HomePage.test.tsx
- Use semantic <output> element instead of div with role="status"
- Use semantic <button> element instead of div with role="button"
- Remove useless React fragment in StudyPage.tsx
- Fix useCallback dependencies for handleFlip and handleRating
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'src/client/pages/HomePage.test.tsx')
| -rw-r--r-- | src/client/pages/HomePage.test.tsx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/client/pages/HomePage.test.tsx b/src/client/pages/HomePage.test.tsx index f75f88d..18c2e76 100644 --- a/src/client/pages/HomePage.test.tsx +++ b/src/client/pages/HomePage.test.tsx @@ -484,7 +484,7 @@ describe("HomePage", () => { }); const editButtons = screen.getAllByRole("button", { name: "Edit" }); - await user.click(editButtons[0]!); + await user.click(editButtons.at(0) as HTMLElement); expect(screen.getByRole("dialog")).toBeDefined(); expect(screen.getByRole("heading", { name: "Edit Deck" })).toBeDefined(); @@ -512,7 +512,7 @@ describe("HomePage", () => { }); const editButtons = screen.getAllByRole("button", { name: "Edit" }); - await user.click(editButtons[0]!); + await user.click(editButtons.at(0) as HTMLElement); expect(screen.getByRole("dialog")).toBeDefined(); @@ -557,7 +557,7 @@ describe("HomePage", () => { // Click Edit on first deck const editButtons = screen.getAllByRole("button", { name: "Edit" }); - await user.click(editButtons[0]!); + await user.click(editButtons.at(0) as HTMLElement); // Update name const nameInput = screen.getByLabelText("Name"); @@ -623,7 +623,7 @@ describe("HomePage", () => { }); const deleteButtons = screen.getAllByRole("button", { name: "Delete" }); - await user.click(deleteButtons[0]!); + await user.click(deleteButtons.at(0) as HTMLElement); expect(screen.getByRole("dialog")).toBeDefined(); expect( @@ -652,7 +652,7 @@ describe("HomePage", () => { }); const deleteButtons = screen.getAllByRole("button", { name: "Delete" }); - await user.click(deleteButtons[0]!); + await user.click(deleteButtons.at(0) as HTMLElement); expect(screen.getByRole("dialog")).toBeDefined(); @@ -693,7 +693,7 @@ describe("HomePage", () => { // Click Delete on first deck const deleteButtons = screen.getAllByRole("button", { name: "Delete" }); - await user.click(deleteButtons[0]!); + await user.click(deleteButtons.at(0) as HTMLElement); // Wait for modal to appear await waitFor(() => { @@ -706,7 +706,7 @@ describe("HomePage", () => { const deleteButton = Array.from(dialogButtons).find( (btn) => btn.textContent === "Delete", ); - await user.click(deleteButton!); + await user.click(deleteButton as HTMLElement); // Modal should close await waitFor(() => { |
