Skip to content

Commit

Permalink
try installing font from source
Browse files Browse the repository at this point in the history
  • Loading branch information
ryfu-msft committed Dec 9, 2024
1 parent 745a4ed commit b5f3c16
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions src/AppInstallerCLIE2ETests/FontCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,6 @@ public class FontCommand : BaseCommand
public void OneTimeSetup()
{
WinGetSettingsHelper.ConfigureFeature("fonts", true);

// TODO: Remove once font manifests can be installed from a source.
TestCommon.RunAICLICommand("settings", "--enable LocalManifestFiles");
}

/// <summary>
/// One time tear down.
/// </summary>
[OneTimeTearDown]
public void OneTimeTearDown()
{
// TODO: Remove once font manifests can be installed from a source.
TestCommon.RunAICLICommand("settings", "--disable LocalManifestFiles");
}

/// <summary>
Expand All @@ -42,7 +29,7 @@ public void OneTimeTearDown()
[Test]
public void InstallFont()
{
var result = TestCommon.RunAICLICommand("font install", $"-m {TestCommon.GetTestDataFile(@"Manifests\TestFont.yaml")}");
var result = TestCommon.RunAICLICommand("install", "AppInstallerTest.TestFont");
Assert.AreEqual(Constants.ErrorCode.S_OK, result.ExitCode);
Assert.True(result.StdOut.Contains("Successfully installed"));
TestCommon.VerifyFontPackage(Constants.TestFontSubKeyName, Constants.FontFileName);
Expand All @@ -54,7 +41,7 @@ public void InstallFont()
[Test]
public void InstallFont_MachineScope()
{
var result = TestCommon.RunAICLICommand("font install", $"-m {TestCommon.GetTestDataFile(@"Manifests\TestFont.yaml")} --scope Machine");
var result = TestCommon.RunAICLICommand("install", "AppInstallerTest.TestFont --scope Machine");
Assert.AreEqual(Constants.ErrorCode.S_OK, result.ExitCode);
Assert.True(result.StdOut.Contains("Successfully installed"));
TestCommon.VerifyFontPackage(Constants.TestFontSubKeyName, Constants.FontFileName, TestCommon.Scope.Machine);
Expand All @@ -66,7 +53,7 @@ public void InstallFont_MachineScope()
[Test]
public void InstallInvalidFont()
{
var result = TestCommon.RunAICLICommand("font install", $"-m {TestCommon.GetTestDataFile(@"Manifests\TestInvalidFont.yaml")} --scope Machine");
var result = TestCommon.RunAICLICommand("install", "AppInstallerTest.TestInvalidFont");
Assert.AreEqual(Constants.ErrorCode.ERROR_FONT_FILE_NOT_SUPPORTED, result.ExitCode);
Assert.True(result.StdOut.Contains("The font file is not supported and cannot be installed."));
}
Expand Down

0 comments on commit b5f3c16

Please sign in to comment.