Skip to content

Commit

Permalink
Merge pull request microsoft#1335 from chingucoding/dev/fix-build-errors
Browse files Browse the repository at this point in the history
Fix build errors and CI
  • Loading branch information
karkarl authored Aug 28, 2023
2 parents 91818c9 + d7c780b commit 5ab6b6f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion UITests/AxeHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class AxeHelper

internal static void InitializeAxe()
{
var processes = Process.GetProcessesByName("WinUIGallery.DesktopWap");
var processes = Process.GetProcessesByName("WinUIGallery");
Assert.IsTrue(processes.Length > 0);

var config = Config.Builder.ForProcessId(processes[0].Id).Build();
Expand Down
4 changes: 2 additions & 2 deletions UITests/TestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ private static WindowsElement WaitForPageHeader(string name)
{
for (int i = 0; i < 100; i++)
{
var header = Session.FindElementsByName(name).Where(x => x.GetProperty("AutomationId") == "PageHeader").First();
if (header != null)
var header = Session.FindElementByAccessibilityId("PageHeader");
if (header != null && header.Text == name)
{
return header;
}
Expand Down
1 change: 0 additions & 1 deletion WinUIGallery/Controls/PageHeader.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
</Grid.RowDefinitions>

<TextBlock
AutomationProperties.HeadingLevel="Level1"
Style="{StaticResource TitleTextBlockStyle}"
Text="{x:Bind Item.Title}"
AutomationProperties.AutomationId="PageHeader"
Expand Down
6 changes: 6 additions & 0 deletions WinUIGallery/WinUIGallery.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,14 @@
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
<SDKVersion>10.0</SDKVersion>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
<PfxFile>$(MSBuildProjectDirectory)\..\build\WinUI-Gallery-Test.pfx</PfxFile>
</PropertyGroup>

<PropertyGroup Condition="Exists('$(PfxFile)')">
<PackageCertificateKeyFile>..\build\WinUI-Gallery-Test.pfx</PackageCertificateKeyFile>
</PropertyGroup>


<ItemGroup>
<AppxManifest Include="Package.appxmanifest"
Condition="'$(Configuration)' == 'Release' Or '$(Configuration)' == 'Release-Unpackaged'">
Expand Down
13 changes: 7 additions & 6 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@ steps:
targetType: filePath
filePath: build/GenerateTestPFX.ps1


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

- task: PowerShell@2
inputs:
Expand Down

0 comments on commit 5ab6b6f

Please sign in to comment.