Clarify remote cache bootstrap labels
This commit is contained in:
@@ -3400,17 +3400,17 @@ func (u *ui) remoteOpenButtonLabel() string {
|
||||
if u.selectedRemoteUsesLocalCache() {
|
||||
return "Opening Cached Vault..."
|
||||
}
|
||||
return "Opening Cached Vault Setup..."
|
||||
return "Creating Local Cache..."
|
||||
case u.remoteOpenRetryAvailable():
|
||||
if u.selectedRemoteUsesLocalCache() {
|
||||
return "Retry Cached Vault"
|
||||
}
|
||||
return "Retry Cached Vault Setup"
|
||||
return "Retry Local Cache Setup"
|
||||
default:
|
||||
if u.selectedRemoteUsesLocalCache() {
|
||||
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.lifecycleMode = "remote"
|
||||
|
||||
if got := u.remoteOpenButtonLabel(); got != "Open And Cache Vault" {
|
||||
t.Fatalf("remoteOpenButtonLabel() = %q, want %q", got, "Open And Cache Vault")
|
||||
if got := u.remoteOpenButtonLabel(); got != "Create Local Cache" {
|
||||
t.Fatalf("remoteOpenButtonLabel() = %q, want %q", got, "Create Local Cache")
|
||||
}
|
||||
|
||||
u.state.ErrorMessage = "open remote vault failed: dial tcp timeout"
|
||||
if got := u.remoteOpenButtonLabel(); got != "Retry Cached Vault Setup" {
|
||||
t.Fatalf("remoteOpenButtonLabel() after error = %q, want %q", got, "Retry Cached Vault Setup")
|
||||
if got := u.remoteOpenButtonLabel(); got != "Retry Local Cache 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