test(coverage): high-value branch-coverage additions (RichText, VMs, MailRepositoryImpl) #289

Closed
opened 2026-07-04 05:44:19 +00:00 by JMR-dev · 0 comments
JMR-dev commented 2026-07-04 05:44:19 +00:00 (Migrated from github.com)

From the Phase-2 audit §4 — files already ≥95% line but leaking real branches; all pure JVM logic, high value. No emulator.

  • richtext/RichTextEditing — 35 missed branches; uncovered removeLink/remapLink/styleAt.
  • richtext/RichTextHtmlParser — 43 missed branches; parseCssColor (4/7), richAlignFor, inline/block tag edges.
  • ui/mailbox/MailboxViewModel — 40 missed branches.
  • ui/compose/ComposeViewModel — 37 missed branches.
  • data/repository/MailRepositoryImpl — 81 missed branches; esp. null-role-folder fallbacks in archive/reportSpam/trash + resolveRoleFolder (cheap "role folder missing" test).
  • data/repository/AccountRepositoryImpl — reorderAccounts (1 line, #240 path).
  • Smaller: mail/HtmlToText (12 br), reporting/DiagnosticsCollector (13 br), data/SignatureBlock (5 br), reporting/AppLog (4 br).

Validate :app:testDebugUnitTest; aim to raise branch coverage on each. No emulator.

From the Phase-2 audit §4 — files already ≥95% line but leaking real branches; all pure JVM logic, high value. **No emulator.** - `richtext/RichTextEditing` — 35 missed branches; uncovered `removeLink/remapLink/styleAt`. - `richtext/RichTextHtmlParser` — 43 missed branches; `parseCssColor` (4/7), `richAlignFor`, inline/block tag edges. - `ui/mailbox/MailboxViewModel` — 40 missed branches. - `ui/compose/ComposeViewModel` — 37 missed branches. - `data/repository/MailRepositoryImpl` — 81 missed branches; esp. null-role-folder fallbacks in `archive/reportSpam/trash` + `resolveRoleFolder` (cheap "role folder missing" test). - `data/repository/AccountRepositoryImpl` — `reorderAccounts` (1 line, #240 path). - Smaller: `mail/HtmlToText` (12 br), `reporting/DiagnosticsCollector` (13 br), `data/SignatureBlock` (5 br), `reporting/AppLog` (4 br). Validate `:app:testDebugUnitTest`; aim to raise branch coverage on each. No emulator.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: JMR-dev/LibreMail#289