libcosmic/src
Claude d25a51bd32
Add comprehensive testing infrastructure: visual snapshots, unit, property, and theme tests
Introduces a multi-layered testing strategy for the libcosmic widget toolkit:

- Visual snapshot testing: Renders widgets via tiny-skia software renderer and
  compares pixel output against reference PNGs. Generates diff images on failure.
  Covers containers, dividers, text styles, progress bars, and layouts.

- Widget unit tests: Thorough behavioral tests for segmented button model
  (selection, ordering, data storage, enable/disable, closable, indent),
  calendar model (month navigation, year wrapping, date selection, grid layout),
  spin button (clamping, increment/decrement, float support), and color picker.

- Property-based tests (proptest): Randomized input testing for spin button
  bounds invariants, calendar first-day-of-week correctness, segmented model
  length/clear/toggle invariants, and theme spacing monotonicity.

- Theme consistency tests: Validates all four theme variants (dark, light,
  high-contrast dark/light) have valid spacing, corner radii ordering,
  non-zero-alpha colors, visible text-on-background, and RON round-trip
  serialization.

- Expanded inline tests: 16 new spin_button unit tests covering increment,
  decrement, clamping, float types, and constructor value bounds.

- CI integration: New visual-tests job runs snapshot, theme, property, and
  widget tests with artifact upload on failure for snapshot diffs.

https://claude.ai/code/session_01P3WLXMif9wmNXbWDo5FhRQ
2026-02-18 01:23:14 +00:00
..
app improv: remove double coloring of content_container windows 2026-01-27 18:07:35 -07:00
applet feat(applets): configurable applet overlap and padding increases 2025-11-11 21:04:09 +01:00
config fix: don't error when default config for toolkit settings is not present 2025-08-22 22:41:12 +02:00
dialog chore: apply clippy suggestions 2025-10-05 04:40:51 +02:00
executor chore: improve documentation 2023-08-16 16:59:15 +02:00
surface cargo fmt 2025-09-30 10:59:51 -04:00
theme improv: remove double coloring of content_container windows 2026-01-27 18:07:35 -07:00
widget Add comprehensive testing infrastructure: visual snapshots, unit, property, and theme tests 2026-02-18 01:23:14 +00:00
action.rs feat: Tooltips and Better Surface Management 2025-03-14 16:56:21 +01:00
command.rs feat: Tooltips and Better Surface Management 2025-03-14 16:56:21 +01:00
core.rs perf: reduce memory allocations 2025-10-22 04:30:57 +02:00
dbus_activation.rs feat: add dbus_connection() method to app::Application trait 2025-07-21 22:59:09 +02:00
desktop.rs fix!(desktop): IconSourceExt::as_cosmic_icon should return Handle with SVG preference 2026-01-06 02:25:46 +01:00
ext.rs feat: Tooltips and Better Surface Management 2025-03-14 16:56:21 +01:00
font.rs perf: inline public getters/setters, and use non-generic inner functions 2025-03-21 13:31:34 +01:00
icon_theme.rs perf: inline public getters/setters, and use non-generic inner functions 2025-03-21 13:31:34 +01:00
keyboard_nav.rs perf: inline public getters/setters, and use non-generic inner functions 2025-03-21 13:31:34 +01:00
lib.rs Add helper for accumulating scroll into discrete delta 2025-12-06 20:00:59 -08:00
localize.rs feat: add i18n support for libcosmic widgets 2025-09-05 18:50:25 +02:00
malloc.rs perf: inline public getters/setters, and use non-generic inner functions 2025-03-21 13:31:34 +01:00
process.rs tests: fix env guard and pipe read for tab dnd 2025-11-20 22:33:13 +01:00
scroll.rs Add helper for accumulating scroll into discrete delta 2025-12-06 20:00:59 -08:00
task.rs chore(task): add none function 2025-04-22 14:37:58 +02:00