Skip to content

Commit c6858f2

Browse files
marcelwgnkaiguo
authored andcommitted
Fix test ItemsRepeater VerifyAnchor (#1797)
1 parent e7e0823 commit c6858f2

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

dev/Repeater/APITests/RepeaterTests.cs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -196,14 +196,6 @@ public void ValidateGetSetBackground()
196196
[TestMethod]
197197
public void VerifyCurrentAnchor()
198198
{
199-
if(PlatformConfiguration.IsDebugBuildConfiguration())
200-
{
201-
// Test is failing in chk configuration due to:
202-
// Bug #1726 Test Failure: RepeaterTests.VerifyCurrentAnchor
203-
Log.Warning("Skipping test for Debug builds.");
204-
return;
205-
}
206-
207199
ItemsRepeater rootRepeater = null;
208200
ScrollViewer scrollViewer = null;
209201
ItemsRepeaterScrollHost scrollhost = null;
@@ -257,6 +249,11 @@ public void VerifyCurrentAnchor()
257249
var anchor = PlatformConfiguration.IsOSVersionLessThan(OSVersion.Redstone5) ?
258250
scrollhost.CurrentAnchor :
259251
scrollViewer.CurrentAnchor;
252+
if (PlatformConfiguration.IsOsVersion(OSVersion.NineteenH1)
253+
&& PlatformConfiguration.IsDebugBuildConfiguration())
254+
{
255+
anchor = scrollhost.CurrentAnchor;
256+
}
260257
var anchorIndex = rootRepeater.GetElementIndex(anchor);
261258
Log.Comment("CurrentAnchor: " + anchorIndex);
262259
Verify.AreEqual(i * 4, anchorIndex);

0 commit comments

Comments
 (0)