Simplify desktop remote open flow
This commit is contained in:
@@ -4377,6 +4377,29 @@ func TestShowLocalVaultChooser(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestShowRemoteConnectionChooser(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
u := newUIWithSession("desktop", &session.Manager{})
|
||||
u.lifecycleMode = "remote"
|
||||
u.remoteBaseURL.SetText("")
|
||||
u.remotePath.SetText("")
|
||||
if got := u.showRemoteConnectionChooser(); !got {
|
||||
t.Fatal("showRemoteConnectionChooser() = false, want true when no remote connection is selected")
|
||||
}
|
||||
|
||||
u.remoteBaseURL.SetText("https://dav.crew.example.invalid")
|
||||
u.remotePath.SetText("vaults/bellagio.kdbx")
|
||||
if got := u.showRemoteConnectionChooser(); got {
|
||||
t.Fatal("showRemoteConnectionChooser() = true, want false when a remote connection is selected")
|
||||
}
|
||||
|
||||
u.lifecycleMode = "local"
|
||||
if got := u.showRemoteConnectionChooser(); !got {
|
||||
t.Fatal("showRemoteConnectionChooser() = false, want true outside remote lifecycle mode")
|
||||
}
|
||||
}
|
||||
|
||||
func TestSwitchToLifecycleSelectionResetsLockedLocalSession(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user