feat: lazysecrets open --action ends in the secrets list, like Go to
This commit is contained in:
4 files changed
+48
-16
No files matched your search
@@ -203,8 +203,8 @@ func TestOpenPromptAndStartupOpen(t *testing.T) {
|
||||
t.Fatal("open at startup didn't ask what to do")
|
||||
}
|
||||
d2.keys("o")
|
||||
if _, _, s := d2.selected(); s != "api-key" {
|
||||
t.Errorf("open at startup: selected %q", s)
|
||||
if _, _, s := d2.selected(); s != "api-key" || d2.m.focus != paneDetail {
|
||||
t.Errorf("open at startup: selected %q, focus %v, want the details", s, d2.m.focus)
|
||||
}
|
||||
|
||||
// --action: no question, it does that.
|
||||
@@ -212,8 +212,8 @@ func TestOpenPromptAndStartupOpen(t *testing.T) {
|
||||
if d3.m.prompt != nil {
|
||||
t.Fatalf("--action go asked: %q", d3.m.prompt.title)
|
||||
}
|
||||
if _, _, s := d3.selected(); s != "api-key" {
|
||||
t.Errorf("--action go: selected %q", s)
|
||||
if _, _, s := d3.selected(); s != "api-key" || d3.m.focus != paneSecrets {
|
||||
t.Errorf("--action go: selected %q, focus %v, want the secrets list, like Go to", s, d3.m.focus)
|
||||
}
|
||||
d4 := newDriverOpts(t, Options{Open: &r, OpenAction: "copy"})
|
||||
if _, _, s := d4.selected(); s != "api-key" || d4.clip().content == "" {
|
||||
|
||||
Reference in new issue
Block a user