Keep remote form open during manual entry
This commit is contained in:
+29
-1
@@ -4421,8 +4421,16 @@ func TestShowRemoteConnectionChooser(t *testing.T) {
|
||||
|
||||
u.remoteBaseURL.SetText("https://dav.crew.example.invalid")
|
||||
u.remotePath.SetText("vaults/bellagio.kdbx")
|
||||
if got := u.showRemoteConnectionChooser(); !got {
|
||||
t.Fatal("showRemoteConnectionChooser() = false, want true while manually entering a remote connection")
|
||||
}
|
||||
|
||||
u.applyRecentRemoteRecord(recentRemoteRecord{
|
||||
BaseURL: "https://dav.crew.example.invalid",
|
||||
Path: "vaults/bellagio.kdbx",
|
||||
})
|
||||
if got := u.showRemoteConnectionChooser(); got {
|
||||
t.Fatal("showRemoteConnectionChooser() = true, want false when a remote connection is selected")
|
||||
t.Fatal("showRemoteConnectionChooser() = true, want false after selecting a saved remote connection")
|
||||
}
|
||||
|
||||
u.lifecycleMode = "local"
|
||||
@@ -4431,6 +4439,26 @@ func TestShowRemoteConnectionChooser(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestApplyingRecentRemoteRecordMarksSelectedRemoteConnection(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
u := newUIWithSession("desktop", &session.Manager{})
|
||||
if u.hasSelectedRemoteTarget() {
|
||||
t.Fatal("hasSelectedRemoteTarget() = true, want false before selecting a saved remote connection")
|
||||
}
|
||||
|
||||
u.applyRecentRemoteRecord(recentRemoteRecord{
|
||||
BaseURL: "https://dav.crew.example.invalid",
|
||||
Path: "vaults/bellagio.kdbx",
|
||||
Username: "dannyocean",
|
||||
Password: "topsecret",
|
||||
})
|
||||
|
||||
if !u.hasSelectedRemoteTarget() {
|
||||
t.Fatal("hasSelectedRemoteTarget() = false, want true after selecting a saved remote connection")
|
||||
}
|
||||
}
|
||||
|
||||
func TestSwitchToLifecycleSelectionResetsLockedLocalSession(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user