Skip to content
This repository was archived by the owner on Nov 2, 2026. It is now read-only.

feat: speed in the ports, tests for card and editor (0.2.0) - #12

Merged
eizedev merged 1 commit into
mainfrom
feat/speed-labels-tests
Oct 30, 2026
Merged

eizedev merged 1 commit into
mainfrom
feat/speed-labels-tests

Conversation

@eizedev

@eizedev eizedev commented Oct 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • Port state not only by colour #7: each port with link shows its speed (1G, 2.5G, 100, 10) in its lower half, next to the trunk mark T, so the state does not rest on colour alone. New option show_speed (default on, also in the settings dialog). The link and PoE symbols stay at the top; nothing overlaps (checked in a sections view at 1500 and 390 px).
  • Tests for the card and its editor #6: card and editor are tested in happy-dom: no switch, ports and trunks, options, clicks to more-info, too old integration, device that is not a switch, re-reading when the switch comes back with a failure keeping the picture, SFP row of the 1930, card picker, editor labels and config changes. npm test now runs with coverage and fails below 95 % lines/statements/functions and 90 % branches.
  • Version 0.2.0 (new option); screenshot updated.

Closes #6
Closes #7

The card page in ha-managed-switch (docs/card.md) gets the new option in a separate pull request.

Test plan

  • npm run typecheck, npm test (32 tests, coverage above the thresholds), npm run build pass
  • Looked at the card in the demo instance, sections view at 1500 and 390 px, light theme
  • Texts in English and German
  • CHANGELOG.md, README, AGENTS.md updated

🤖 Generated with Claude Code

- Each port with link shows its speed (1G, 2.5G, 100, 10) in the lower half, next to the trunk
  mark, so its state does not rest on colour alone; show_speed: false turns it off.
- Card and editor are tested in happy-dom (rendering, options, clicks, errors, re-reading, SFP
  row, card picker); npm test enforces a minimum coverage.

Closes #6
Closes #7

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@eizedev
eizedev merged commit 1d65e9e into main Oct 30, 2026
3 checks passed
@eizedev
eizedev deleted the feat/speed-labels-tests branch October 30, 2026 18:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Port state not only by colour Tests for the card and its editor

1 participant