Skip to content

Commit

Permalink
Enable chk tests (#1729)
Browse files Browse the repository at this point in the history
Adds chk configuration to the test matrix.

Fixes #1563

Enabling this configuration uncovered three issues:

* RecyclingElementFactory.Templates cannot be set from Xaml on RS4 and below in debug configuration (using reflection provider) #1725
* Test Failure: RepeaterTests.VerifyCurrentAnchor #1726
* NavigationViewTests.EnsureDynamicSizeForPaneHeaderFooterAndCustomContent fails in CHK configuration on RS2 #1734

These three test cases have been disabled for chk configuration for now.
  • Loading branch information
kmahone authored and ranjeshj committed Feb 13, 2020
1 parent 8bfcac7 commit 909f039
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 26 deletions.
4 changes: 2 additions & 2 deletions build/CopyFilesToStagingDir.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ if($PublishAppxFiles)
# Publish pdbs:
$symbolsOutputDir = "$($FullPublishDir)\Symbols\"
PublishFile -IfExists $FullBuildOutput\Microsoft.UI.Xaml\Microsoft.UI.Xaml.pdb $symbolsOutputDir
PublishFile -IfExists $FullBuildOutput\IXMPTestApp\IXMPTestApp.pdb $symbolsOutputDir
PublishFile -IfExists $FullBuildOutput\IXMPTestApp.TAEF\IXMPTestApp.pdb $symbolsOutputDir
PublishFile -IfExists $FullBuildOutput\MUXTestUtilities\MUXTestUtilities.pdb $symbolsOutputDir
PublishFile -IfExists $FullBuildOutput\MUXControls.Test\MUXControls.Test.pdb $symbolsOutputDir
PublishFile -IfExists $FullBuildOutput\MUXControlsTestApp\MUXControlsTestApp.pdb $symbolsOutputDir
PublishFile -IfExists $FullBuildOutput\MUXControlsTestApp.TAEF\MUXControlsTestApp.pdb $symbolsOutputDir
PublishFile -IfExists $FullBuildOutput\MUXControlsTestAppForIslands\MUXControlsTestAppForIslands.pdb $symbolsOutputDir
PublishFile -IfExists $FullBuildOutput\MUXControlsTestAppWPF\MUXControlsTestAppWPF.pdb $symbolsOutputDir
PublishFile -IfExists $FullBuildOutput\TestAppCX\TestAppCX.pdb $symbolsOutputDir
Expand Down
9 changes: 9 additions & 0 deletions dev/CommonManaged/PlatformConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,14 @@ public static bool IsOSVersionLessThan(OSVersion version)
{
return !IsOsVersionGreaterThanOrEqual(version);
}

public static bool IsDebugBuildConfiguration()
{
#if DEBUG
return true;
#else
return false;
#endif
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3722,6 +3722,14 @@ public void EnsureTopSettingsRetainsFocusAfterOrientationChanges()
[TestProperty("TestSuite", "D")]
public void EnsureDynamicSizeForPaneHeaderFooterAndCustomContent()
{
if (PlatformConfiguration.IsDebugBuildConfiguration())
{
// Test is failing in chk configuration due to:
// Bug #1734 NavigationViewTests.EnsureDynamicSizeForPaneHeaderFooterAndCustomContent fails in CHK configuration
Log.Warning("Skipping test for Debug builds.");
return;
}

using (var setup = new TestSetupHelper(new[] { "NavigationView Tests", "NavigationView Stretch Test" }))
{
Button navButton = new Button(FindElement.ById("TogglePaneButton"));
Expand Down
8 changes: 8 additions & 0 deletions dev/Repeater/APITests/RepeaterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,14 @@ public void ValidateGetSetBackground()
[TestMethod]
public void VerifyCurrentAnchor()
{
if(PlatformConfiguration.IsDebugBuildConfiguration())
{
// Test is failing in chk configuration due to:
// Bug #1726 Test Failure: RepeaterTests.VerifyCurrentAnchor
Log.Warning("Skipping test for Debug builds.");
return;
}

ItemsRepeater rootRepeater = null;
ScrollViewer scrollViewer = null;
ItemsRepeaterScrollHost scrollhost = null;
Expand Down
54 changes: 30 additions & 24 deletions test/IXMPTestApp/Tests/MetadataProviderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,30 +55,36 @@ public void CanLoadXamlFragments()
<Rectangle Width='100' Height='100' Fill='Red' />
</controls:ParallaxView>");

Log.Comment("Loading ItemsRepeater...");
XamlReader.Load(@"
<controls:ItemsRepeaterScrollHost
xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
xmlns:controls='using:Microsoft.UI.Xaml.Controls'>
<ScrollViewer>
<controls:ItemsRepeater Name='repeater'>
<controls:ItemsRepeater.Layout>
<controls:StackLayout Orientation='Vertical' Spacing='10' />
</controls:ItemsRepeater.Layout>
<controls:ItemsRepeater.ItemTemplate>
<controls:RecyclingElementFactory>
<controls:RecyclingElementFactory.RecyclePool>
<controls:RecyclePool />
</controls:RecyclingElementFactory.RecyclePool>
<DataTemplate x:Key='Primary'>
<TextBlock Text='{Binding}' />
</DataTemplate>
</controls:RecyclingElementFactory>
</controls:ItemsRepeater.ItemTemplate>
</controls:ItemsRepeater>
</ScrollViewer>
</controls:ItemsRepeaterScrollHost>");

// This test case is disabled in Debug configuration due to:
// Bug #1725: RecyclingElementFactory.Templates cannot be set from Xaml on RS4 and below in debug configuration (using reflection provider)
if (!PlatformConfiguration.IsDebugBuildConfiguration())
{
Log.Comment("Loading ItemsRepeater...");
XamlReader.Load(@"
<controls:ItemsRepeaterScrollHost
xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
xmlns:controls='using:Microsoft.UI.Xaml.Controls'>
<ScrollViewer>
<controls:ItemsRepeater Name='repeater'>
<controls:ItemsRepeater.Layout>
<controls:StackLayout Orientation='Vertical' Spacing='10' />
</controls:ItemsRepeater.Layout>
<controls:ItemsRepeater.ItemTemplate>
<controls:RecyclingElementFactory>
<controls:RecyclingElementFactory.RecyclePool>
<controls:RecyclePool />
</controls:RecyclingElementFactory.RecyclePool>
<DataTemplate x:Key='Primary'>
<TextBlock Text='{Binding}' />
</DataTemplate>
</controls:RecyclingElementFactory>
</controls:ItemsRepeater.ItemTemplate>
</controls:ItemsRepeater>
</ScrollViewer>
</controls:ItemsRepeaterScrollHost>");
}

Log.Comment("Loading SwipeControl...");
XamlReader.Load(@"
Expand Down

0 comments on commit 909f039

Please sign in to comment.