Skip to content

Commit 5ab6b6f

Browse files
authored
Merge pull request #1335 from chingucoding/dev/fix-build-errors
Fix build errors and CI
2 parents 91818c9 + d7c780b commit 5ab6b6f

5 files changed

Lines changed: 16 additions & 10 deletions

File tree

UITests/AxeHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public class AxeHelper
2828

2929
internal static void InitializeAxe()
3030
{
31-
var processes = Process.GetProcessesByName("WinUIGallery.DesktopWap");
31+
var processes = Process.GetProcessesByName("WinUIGallery");
3232
Assert.IsTrue(processes.Length > 0);
3333

3434
var config = Config.Builder.ForProcessId(processes[0].Id).Build();

UITests/TestBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ private static WindowsElement WaitForPageHeader(string name)
5454
{
5555
for (int i = 0; i < 100; i++)
5656
{
57-
var header = Session.FindElementsByName(name).Where(x => x.GetProperty("AutomationId") == "PageHeader").First();
58-
if (header != null)
57+
var header = Session.FindElementByAccessibilityId("PageHeader");
58+
if (header != null && header.Text == name)
5959
{
6060
return header;
6161
}

WinUIGallery/Controls/PageHeader.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
</Grid.RowDefinitions>
2828

2929
<TextBlock
30-
AutomationProperties.HeadingLevel="Level1"
3130
Style="{StaticResource TitleTextBlockStyle}"
3231
Text="{x:Bind Item.Title}"
3332
AutomationProperties.AutomationId="PageHeader"

WinUIGallery/WinUIGallery.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,14 @@
4949
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
5050
<SDKVersion>10.0</SDKVersion>
5151
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
52+
<PfxFile>$(MSBuildProjectDirectory)\..\build\WinUI-Gallery-Test.pfx</PfxFile>
5253
</PropertyGroup>
5354

55+
<PropertyGroup Condition="Exists('$(PfxFile)')">
56+
<PackageCertificateKeyFile>..\build\WinUI-Gallery-Test.pfx</PackageCertificateKeyFile>
57+
</PropertyGroup>
58+
59+
5460
<ItemGroup>
5561
<AppxManifest Include="Package.appxmanifest"
5662
Condition="'$(Configuration)' == 'Release' Or '$(Configuration)' == 'Release-Unpackaged'">

azure-pipelines.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,14 @@ steps:
3636
targetType: filePath
3737
filePath: build/GenerateTestPFX.ps1
3838

39-
40-
- task: VSBuild@1
39+
- task: DotNetCoreCLI@2
4140
inputs:
42-
platform: $(buildPlatform)
43-
solution: "$(solutionGallery)"
44-
configuration: "$(buildConfiguration)"
45-
msbuildArgs: '/p:PublishReadyToRun=false /p:AppxBundlePlatforms="$(buildPlatform)" /p:AppxPackageDir="$(appxPackageDir)" /p:AppxBundle=Always /p:UapAppxPackageBuildMode=SideloadOnly /p:AppxPackageSigningEnabled=true'
41+
command: 'publish'
42+
publishWebProjects: false
43+
projects: '$(solutionGallery)'
44+
arguments: '/p:AppxPackageDir="D:\a\1\a\AppxPackages\\" /p:platform="$(buildPlatform)" /p:PublishProfile="./WinUIGallery/Properties/PublishProfiles/win10-$(buildPlatform).pubxml"'
45+
zipAfterPublish: false
46+
modifyOutputPath: false
4647

4748
- task: PowerShell@2
4849
inputs:

0 commit comments

Comments
 (0)