summaryrefslogtreecommitdiff
path: root/internal/tui/entries_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-05 22:20:48 +0200
committerPaul Buetow <paul@buetow.org>2026-03-05 22:20:48 +0200
commit80de1ea2e76ed1283d95b85d808b13ae4338015a (patch)
tree7c24eb61f7782f09c9082718f49ad87c556dda81 /internal/tui/entries_test.go
parent83ae6b0b19a1f5bb18069210700fc81d2f43278a (diff)
add page scrolling keys and bump version to v0.7.0v0.7.0
Diffstat (limited to 'internal/tui/entries_test.go')
-rw-r--r--internal/tui/entries_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/internal/tui/entries_test.go b/internal/tui/entries_test.go
index 8d6bf1f..baebf56 100644
--- a/internal/tui/entries_test.go
+++ b/internal/tui/entries_test.go
@@ -140,6 +140,18 @@ func TestEntriesNavigationKeys(t *testing.T) {
if model.cursor >= before {
t.Fatalf("cursor after ctrl+u = %d, want less than %d", model.cursor, before)
}
+
+ model.cursor = 0
+ model.offset = 0
+ model, _ = model.Update(keyCode(tea.KeyPgDown))
+ if got, want := model.cursor, model.pageSize(); got != want {
+ t.Fatalf("cursor after pgdown = %d, want %d", got, want)
+ }
+
+ model, _ = model.Update(keyCode(tea.KeyPgUp))
+ if model.cursor != 0 {
+ t.Fatalf("cursor after pgup = %d, want 0", model.cursor)
+ }
}
func TestEntriesSearchAndFilter(t *testing.T) {