test: --demo's disabled smtp-password, with its note, is in kv-app-prod

This commit is contained in:
keb committed 2026-10-14 21:24:01 +02:00
1 parent 0a3a07d5cf
commit 1eb2f21588
4 files changed
+18 -13

No files matched your search

+7 -7
View File
@@ -686,7 +686,7 @@ func TestFilter(t *testing.T) {
d.keys("/")
d.typeText("api-k")
d.keys("enter", "esc") // apply, then esc clears the applied filter
if d.m.secrets.Len() != 3 {
if d.m.secrets.Len() != 4 {
t.Errorf("esc should clear the applied filter, visible = %d", d.m.secrets.Len())
}
if _, _, s := d.selected(); s != "api-key" {
@@ -698,13 +698,13 @@ func TestMoveWhileFiltering(t *testing.T) {
t.Parallel()
d := newDriver(t)
d.keys("3", "/")
d.typeText("a") // all three secrets contain an a
if d.m.secrets.Len() != 3 {
d.typeText("a") // all four secrets contain an a
if d.m.secrets.Len() != 4 {
t.Fatalf("visible = %d", d.m.secrets.Len())
}
_, _, initial := d.selected() // kept from before filtering: the middle row
var seen []string
for _, k := range []rune{'j', 'j', 'k'} {
for _, k := range []rune{'j', 'j', 'j', 'k'} {
d.send(tea.KeyPressMsg{Code: k, Mod: tea.ModCtrl})
_, _, s := d.selected()
seen = append(seen, s)
@@ -712,9 +712,9 @@ func TestMoveWhileFiltering(t *testing.T) {
if !d.m.secrets.Filtering() {
t.Fatal("ctrl+j/k left filter mode")
}
// down to the bottom, stay there, back up to where it started
if seen[0] == initial || seen[1] != seen[0] || seen[2] != initial {
t.Errorf("from %q, ctrl+j, ctrl+j, ctrl+k selected %v", initial, seen)
// down to the bottom, stay there, back up one
if seen[0] == initial || seen[2] != seen[1] || seen[3] != seen[0] {
t.Errorf("from %q, ctrl+j ×3, ctrl+k selected %v", initial, seen)
}
if !strings.Contains(d.screen(), "ctrl+j/n down") {
t.Errorf("filter help missing ctrl+j:\n%s", d.screen())
+2 -2
View File
@@ -21,6 +21,7 @@
│ db-password ││ │
│ api-key ││ │
│ legacy-token ✗ expired ││ │
│ smtp-password (disabled) ││ │
│ ││ │
│ ││ │
│ ││ │
@@ -28,6 +29,5 @@
│ ││ │
│ ││ │
│ ││ │
│ ││ │
╰────────────────────── 1 of 3 ─╯╰──────────────────────────────────────────────────────── 1 of 4 ─╯
╰────────────────────── 1 of 4 ─╯╰──────────────────────────────────────────────────────── 1 of 4 ─╯
enter open • ctrl+s search • s copy link • S share • f star • F favourites • … • ? help • q quit