diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-28 12:52:13 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-28 12:52:13 +0200 |
| commit | 44472bbe31475a3c672ae003d928d7caffb4b50a (patch) | |
| tree | e74bae03c61b62479ef4f68b046e3345618933c8 /internal/tui/tui_test.go | |
| parent | 626f2275438a37e5cd2efb5964281b9bef5ce8cc (diff) | |
| parent | 7b220084cf3951c8cde0582efdfcf628afc64336 (diff) | |
| download | lectio-44472bbe31475a3c672ae003d928d7caffb4b50a.tar.gz lectio-44472bbe31475a3c672ae003d928d7caffb4b50a.zip | |
Merge branch 'of-offline-migration': offline daily view, remove scrapers
Diffstat (limited to 'internal/tui/tui_test.go')
| -rw-r--r-- | internal/tui/tui_test.go | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/internal/tui/tui_test.go b/internal/tui/tui_test.go index f99c4ac..68e09b5 100644 --- a/internal/tui/tui_test.go +++ b/internal/tui/tui_test.go @@ -12,16 +12,16 @@ import ( ) func TestVersionCycle(t *testing.T) { - m := New(config.Config{Versions: []string{"bt", "wuj", "vul"}, DefaultVersion: "bt"}, "", "") - if m.version() != "bt" { + m := New(config.Config{Versions: []string{"wuj", "vul", "grb"}, DefaultVersion: "wuj"}, "", "") + if m.version() != "wuj" { t.Fatalf("start = %q", m.version()) } m = m.cycleVersion(+1) - if m.version() != "wuj" { + if m.version() != "vul" { t.Errorf("after tab = %q", m.version()) } m = m.cycleVersion(-1) - if m.version() != "bt" { + if m.version() != "wuj" { t.Errorf("after shift-tab = %q", m.version()) } } @@ -153,12 +153,14 @@ func TestDayInfoLineOmittedWhenEmpty(t *testing.T) { // TestFooterKeysLocalised checks the footer keybar text follows // cfg.UILanguage. func TestFooterKeysLocalised(t *testing.T) { - en := Model{cfg: config.Config{UILanguage: "en"}, date: "2026-07-22"} + // Give the model a real terminal width so the one-line keybar is not wrapped + // across lines (the 80-col View() fallback would split "q quit"). + en := Model{cfg: config.Config{UILanguage: "en"}, date: "2026-07-22", width: 120} if out := en.View(); !strings.Contains(out, "q quit") { t.Errorf("en View() footer missing %q: %q", "q quit", out) } - pl := Model{cfg: config.Config{UILanguage: "pl"}, date: "2026-07-22"} + pl := Model{cfg: config.Config{UILanguage: "pl"}, date: "2026-07-22", width: 120} if out := pl.View(); !strings.Contains(out, "q wyjście") { t.Errorf("pl View() footer missing %q: %q", "q wyjście", out) } |
