You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix/UI unit tests (#302)
* test: add real unit tests for DragScrollDirective, LogStreamViewer, and CurrentlyInstalled
- DragScrollDirective (new spec): 14 tests covering left-button-only
drag start, cursor/userSelect changes, scrollLeft formula, moved
threshold (> 4px), mouseup cleanup, and click suppression after drag
- LogStreamViewerComponent (replaced stub): 37 tests covering toggleLevel
add/remove/recompute, setMaxAge pruning, scrollToBottom no-op and
correct setScrollPosition call, onEditorInit content-change and
scroll-change listeners, parseEntry JSON/non-JSON/fallback paths,
recomputeLogs level filtering and join format, pruneOldLogs cutoff
and recompute trigger, and ngOnDestroy socket/timer cleanup
- CurrentlyInstalledComponent (new spec): 27 tests covering store
subscription filtering, filteredPackages category + search + sort
(all fields + asc/desc), toggleSort field/direction logic, categoryCount,
upgradableCount, isSelected title+repository matching, toggleSelect
emit, and startColResize position recording
Also fix four pre-existing broken specs: wrong import paths in
magicmirror-controller and base-api specs; stale title assertion in
app.component spec; missing selectedPackages input in shopping-cart spec
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore: add UI unit tests to unit-tests script and pre-commit hook
- unit-tests script now runs Python coverage + Karma/ChromeHeadless in sequence
- ui:test pre-commit hook runs the Angular test suite on staged JS/TS files
- chromium added to devShell packages so CHROME_BIN resolves to the
nix-provided binary in both the script and the hook
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore: add ChromeHeadlessNoSandbox launcher for Linux/CI environments
karma.conf.js gains a customLaunchers block defining ChromeHeadlessNoSandbox
(ChromeHeadless + --no-sandbox/--disable-setuid-sandbox/--disable-gpu).
flake.nix updated to pass --browsers=ChromeHeadlessNoSandbox in both the
unit-tests script and the ui:test pre-commit hook so Nix-provided Chromium
works without sandbox privileges.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* test: expand Angular unit tests to 136 passing with no console noise
Fills in all remaining stub specs with real tests covering components,
services, and models. Adds Angular Unit Tests step to CI pipeline.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore: update readme
* chore: update readme
* fix: resolve no-explicit-any lint errors and jasmine no-expectations warnings
Replace all `any` types in spec files with proper model types and
typed `unknown` casts via helper functions. Add synchronous `expect`
assertions to service tests whose only expectations were in unawaited
`.then()` callbacks.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>