Tailor remote sync setup flow

This commit is contained in:
Joe Julian
2026-04-06 20:27:46 -07:00
parent 57d6a304db
commit 53f7a702fe
2 changed files with 117 additions and 21 deletions
+43
View File
@@ -5931,6 +5931,49 @@ func TestUISelectedLocalVaultRemoteSyncSummaryMentionsSetup(t *testing.T) {
}
}
func TestUISyncDialogUsesRemoteSetupCopy(t *testing.T) {
t.Parallel()
u := newUIWithSession("desktop", &session.Manager{})
u.syncDialogPurpose = syncDialogPurposeRemoteSetup
if got := u.syncDialogTitle(); got != "Set Up Remote Sync" {
t.Fatalf("syncDialogTitle() = %q, want Set Up Remote Sync", got)
}
if got := u.syncDialogDescription(); got != "Send this local vault to a WebDAV target, then use that target for future sync." {
t.Fatalf("syncDialogDescription() = %q, want remote setup guidance", got)
}
if got := u.syncDialogConfirmButtonLabel(); got != "Set Up Remote Sync" {
t.Fatalf("syncDialogConfirmButtonLabel() = %q, want Set Up Remote Sync", got)
}
if u.shouldShowSyncDirectionChoices() {
t.Fatal("shouldShowSyncDirectionChoices() = true, want false for remote setup")
}
if u.shouldShowSyncSourceChoices() {
t.Fatal("shouldShowSyncSourceChoices() = true, want false for remote setup")
}
}
func TestUISyncDialogUsesAdvancedCopy(t *testing.T) {
t.Parallel()
u := newUIWithSession("desktop", &session.Manager{})
u.syncDialogPurpose = syncDialogPurposeAdvanced
if got := u.syncDialogTitle(); got != "Advanced Sync" {
t.Fatalf("syncDialogTitle() = %q, want Advanced Sync", got)
}
if got := u.syncDialogConfirmButtonLabel(); got != "Synchronize" {
t.Fatalf("syncDialogConfirmButtonLabel() = %q, want Synchronize", got)
}
if !u.shouldShowSyncDirectionChoices() {
t.Fatal("shouldShowSyncDirectionChoices() = false, want true for advanced sync")
}
if !u.shouldShowSyncSourceChoices() {
t.Fatal("shouldShowSyncSourceChoices() = false, want true for advanced sync")
}
}
func TestUISaveCurrentRemoteBindingActionPersistsBindingIntoVault(t *testing.T) {
t.Parallel()