Clarify remote cache bootstrap labels
This commit is contained in:
@@ -3400,17 +3400,17 @@ func (u *ui) remoteOpenButtonLabel() string {
|
|||||||
if u.selectedRemoteUsesLocalCache() {
|
if u.selectedRemoteUsesLocalCache() {
|
||||||
return "Opening Cached Vault..."
|
return "Opening Cached Vault..."
|
||||||
}
|
}
|
||||||
return "Opening Cached Vault Setup..."
|
return "Creating Local Cache..."
|
||||||
case u.remoteOpenRetryAvailable():
|
case u.remoteOpenRetryAvailable():
|
||||||
if u.selectedRemoteUsesLocalCache() {
|
if u.selectedRemoteUsesLocalCache() {
|
||||||
return "Retry Cached Vault"
|
return "Retry Cached Vault"
|
||||||
}
|
}
|
||||||
return "Retry Cached Vault Setup"
|
return "Retry Local Cache Setup"
|
||||||
default:
|
default:
|
||||||
if u.selectedRemoteUsesLocalCache() {
|
if u.selectedRemoteUsesLocalCache() {
|
||||||
return "Open Cached Vault"
|
return "Open Cached Vault"
|
||||||
}
|
}
|
||||||
return "Open And Cache Vault"
|
return "Create Local Cache"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+10
-4
@@ -6836,13 +6836,19 @@ func TestUIRemoteOpenButtonLabelOffersRetryAfterFailure(t *testing.T) {
|
|||||||
u := newUIWithSession("desktop", &session.Manager{})
|
u := newUIWithSession("desktop", &session.Manager{})
|
||||||
u.lifecycleMode = "remote"
|
u.lifecycleMode = "remote"
|
||||||
|
|
||||||
if got := u.remoteOpenButtonLabel(); got != "Open And Cache Vault" {
|
if got := u.remoteOpenButtonLabel(); got != "Create Local Cache" {
|
||||||
t.Fatalf("remoteOpenButtonLabel() = %q, want %q", got, "Open And Cache Vault")
|
t.Fatalf("remoteOpenButtonLabel() = %q, want %q", got, "Create Local Cache")
|
||||||
}
|
}
|
||||||
|
|
||||||
u.state.ErrorMessage = "open remote vault failed: dial tcp timeout"
|
u.state.ErrorMessage = "open remote vault failed: dial tcp timeout"
|
||||||
if got := u.remoteOpenButtonLabel(); got != "Retry Cached Vault Setup" {
|
if got := u.remoteOpenButtonLabel(); got != "Retry Local Cache Setup" {
|
||||||
t.Fatalf("remoteOpenButtonLabel() after error = %q, want %q", got, "Retry Cached Vault Setup")
|
t.Fatalf("remoteOpenButtonLabel() after error = %q, want %q", got, "Retry Local Cache Setup")
|
||||||
|
}
|
||||||
|
|
||||||
|
u.loadingMessage = "Opening..."
|
||||||
|
u.state.ErrorMessage = ""
|
||||||
|
if got := u.remoteOpenButtonLabel(); got != "Creating Local Cache..." {
|
||||||
|
t.Fatalf("remoteOpenButtonLabel() while busy = %q, want %q", got, "Creating Local Cache...")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user