feat: add insta snapshot testing for TUI components
- Add insta dev-dependency for visual regression testing - Create lib.rs to expose modules for integration tests - Add snapshot tests for progress_bar, topbar, library, help modal - Add unit tests for LibraryState navigation - Move all tests to tests/ directory (proper Rust convention) - Make build.rs skip proto compilation when protoc unavailable - Add docs/testing-possible-solutions.md with testing strategies
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
---
|
||||
source: tests/ui_snapshots.rs
|
||||
expression: terminal.backend()
|
||||
---
|
||||
"┌─[ Artists · 2 ]──────────────┐┌─[ Detail · UK · Alternative ]────────────────────────────────────┐"
|
||||
"│◐ Radiohead 17/22 ││Radiohead │"
|
||||
"│! Pink Floyd 0/10 ││ │"
|
||||
"│ ││status ● Monitored path /music/Radiohead │"
|
||||
"│ ││quality FLAC size 2.5 GB │"
|
||||
"│ ││albums 2 tracks 17 / 22 │"
|
||||
"│ ││ │"
|
||||
"│ ││─ albums ─ 2 releases │"
|
||||
"│ ││● OK Computer [Album] 1997 ▰▰▰▰▰▰▰▰▰▰ 12/12 FLAC │"
|
||||
"│ ││◐ Kid A [Album] 2000 ▰▰▰▰▰▱▱▱▱▱ 5/10 FLAC │"
|
||||
"│ ││ │"
|
||||
"│ ││ │"
|
||||
"│ ││ │"
|
||||
"│ ││ │"
|
||||
"│ ││ │"
|
||||
"│ ││ │"
|
||||
"│ ││ │"
|
||||
"│ ││ │"
|
||||
"│ ││ │"
|
||||
"│ ││─ tracks · OK Computer ─ 12/12 │"
|
||||
"│ ││(no album selected) │"
|
||||
"│ ││ │"
|
||||
"│ ││ │"
|
||||
"│ ││ │"
|
||||
"│ ││ │"
|
||||
"│ ││ │"
|
||||
"│ ││ │"
|
||||
"│ ││ │"
|
||||
"│ ││ │"
|
||||
"└──────────────────────────────┘└──────────────────────────────────────────────────────────────────┘"
|
||||
Reference in New Issue
Block a user