Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Maui Tests #82

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ public enum DotNetSdkTemplate
Wpf,
Winforms,
Aspire,
maui,
maccatalyst
}
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ public void VerifyWorkloadCmd()

[Fact]
[Trait("Category", "Workload")]
[Trait("Category", "InProgress")]
public void VerifyAspireTemplate()
{
var setup = new DotnetWorkloadTest(
Expand All @@ -236,6 +235,26 @@ public void VerifyAspireTemplate()
cleanup.Execute(_sdkHelper, _scenarioTestInput.TestRoot, "aspire");
}

[Fact]
[Trait("Category", "Workload")]
[Trait("SkipIfPlatform", "LINUX")]
[Trait("SkipIfPlatform", "OSX")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these maui tests should pass on Mac?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They surprisingly don't. They fail due to xCode being missing I believe. It might have been a version problem but I don't have the logs on hand to back that up as it's been a few weeks since I tried.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is likely a fixable machine problem, but installing xCode isn't probably something we should be doing as part of this execution I think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's sorta surprising...It should be installed by default (it supports the build tooling).

public void VerifyMaccatalystTemplate()
{
var setup = new DotnetWorkloadTest(
nameof(SdkTemplateTest), _scenarioTestInput.TargetRid,
DotNetSdkActions.WorkloadInstall);
setup.Execute(_sdkHelper, _scenarioTestInput.TestRoot, "maui-desktop");
var newTest = new SdkTemplateTest(
nameof(SdkTemplateTest), DotNetLanguage.CSharp, _scenarioTestInput.TargetRid, DotNetSdkTemplate.maccatalyst,
DotNetSdkActions.Build | DotNetSdkActions.Publish);
newTest.Execute(_sdkHelper, _scenarioTestInput.TestRoot);
var cleanup = new DotnetWorkloadTest(
nameof(SdkTemplateTest), _scenarioTestInput.TargetRid,
DotNetSdkActions.WorkloadUninstall);
cleanup.Execute(_sdkHelper, _scenarioTestInput.TestRoot, "maui-desktop");
}

[Fact]
[Trait("Category", "Offline")]
public void VerifyPreMadeSolution()
Expand Down