Prioritize phone vault actions
This commit is contained in:
+21
-1
@@ -746,6 +746,20 @@ func TestUILifecycleControlsWithSelectedRecentVaultDoesNotPanic(t *testing.T) {
|
||||
_ = u.lifecycleControls(gtx)
|
||||
}
|
||||
|
||||
func TestUIShouldPrioritizeLifecyclePrimaryActionsOnPhone(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
phone := newUIWithSession("phone", &session.Manager{})
|
||||
if !phone.shouldPrioritizeLifecyclePrimaryActions() {
|
||||
t.Fatal("phone.shouldPrioritizeLifecyclePrimaryActions() = false, want true")
|
||||
}
|
||||
|
||||
desktop := newUIWithSession("desktop", &session.Manager{})
|
||||
if desktop.shouldPrioritizeLifecyclePrimaryActions() {
|
||||
t.Fatal("desktop.shouldPrioritizeLifecyclePrimaryActions() = true, want false")
|
||||
}
|
||||
}
|
||||
|
||||
func TestUIRecentVaultListWithSelectedRecentVaultDoesNotPanic(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
@@ -6040,7 +6054,13 @@ func TestUIRemoteSyncSetupShortcutLabelUsesClearLanguage(t *testing.T) {
|
||||
func TestUILifecycleRemoteSyncActionLabelUsesSetupLanguageWithoutSavedBinding(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
u := newUIWithSession("desktop", &session.Manager{})
|
||||
dir := t.TempDir()
|
||||
u := newUIWithSession("desktop", &session.Manager{}, statePaths{
|
||||
DefaultSaveAsPath: filepath.Join(dir, "vault.kdbx"),
|
||||
RecentVaultsPath: filepath.Join(dir, "recent-vaults.json"),
|
||||
RecentRemotesPath: filepath.Join(dir, "recent-remotes.json"),
|
||||
UIPreferencesPath: filepath.Join(dir, "ui-prefs.json"),
|
||||
})
|
||||
u.vaultPath.SetText("/vaults/bellagio.kdbx")
|
||||
|
||||
if !u.shouldShowLifecycleRemoteSyncAction() {
|
||||
|
||||
Reference in New Issue
Block a user