Workaround for Settings ViewModel tests (#2693)

This commit is contained in:
Tomas Agustin Raies 2020-05-05 16:01:55 -07:00 committed by GitHub
parent 1a29870958
commit 3beea79b38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,7 +59,15 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
this.AutoDownloadUpdates = false;
this.Theme = "system";
this.SystemTheme = "light";
this.PowertoysVersion = interop.CommonManaged.GetProductVersion();
try
{
this.PowertoysVersion = DefaultPowertoysVersion();
}
catch
{
this.PowertoysVersion = "v0.0.0";
}
this.Enabled = new EnabledModules();
this.CustomActionName = string.Empty;
}
@ -69,5 +77,10 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
{
return JsonSerializer.Serialize(this);
}
private string DefaultPowertoysVersion()
{
return interop.CommonManaged.GetProductVersion();
}
}
}