Skip to content

test: add unit tests for SectionEditor and GithubConnect (#61)#67

Merged
corvid-agent merged 3 commits intomainfrom
test/section-editor-unit-tests
Mar 1, 2026
Merged

test: add unit tests for SectionEditor and GithubConnect (#61)#67
corvid-agent merged 3 commits intomainfrom
test/section-editor-unit-tests

Conversation

@corvid-agent
Copy link
Owner

Summary

  • Add 37 unit tests for SectionEditorComponent — heading editing, navigation (prev/next/frontmatter), structured editing mode (table + text blocks), CodeMirror mode detection, section change handling, accessibility, and edge cases
  • Add 47 unit tests for GithubConnectComponent — idle state, PAT form, device flow (user code, polling, cancel), connected state, OAuth signed-in state, connection actions, error display, and accessibility
  • Total: 84 new tests, all passing (383 total across project)

Partially addresses #61 — covers the two highest-priority untested components.

Test plan

  • All 383 tests pass (ng test --watch=false)
  • No regressions in existing tests
  • Both components tested through host component pattern consistent with project conventions

🤖 Generated with Claude Code

corvid-agent and others added 3 commits February 28, 2026 10:11
Adds 42 new tests across 3 previously untested components:

- TableEditorComponent (16 tests): cell change, addRow, removeRow,
  moveRowUp/Down, no-op edge cases, empty state, immutability
- SectionNavComponent (12 tests): nav item rendering, active state,
  click emission, level classes, dynamic updates
- SpecPreviewComponent (14 tests): markdown rendering, validation
  panel states (valid/invalid/warnings), error/warning classes

Contributes to #61

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
37 tests covering heading editing, navigation (prev/next/frontmatter),
structured editing mode (table + text blocks), CodeMirror mode detection,
section change handling, accessibility (ARIA labels/roles), and edge cases.

Closes #61 (partial — SectionEditorComponent)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
47 tests covering: idle state display, PAT form toggle and validation,
signal state management, device flow (user code display, polling status,
cancel), connected state (repo label, pull/disconnect buttons, loading),
OAuth signed-in state (repo browser, manual form), connection actions
(PAT vs OAuth connect, sign in/out, disconnect, pull specs), error
display, and accessibility (ARIA labels, expanded state, alert roles).

Closes #61 (partial — GithubConnectComponent)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@corvid-agent corvid-agent merged commit 972b64a into main Mar 1, 2026
4 checks passed
@corvid-agent corvid-agent deleted the test/section-editor-unit-tests branch March 1, 2026 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant