You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/automated/src/ui/layouts/stack-layout-tests.ts
+7-2Lines changed: 7 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -44,11 +44,16 @@ export class StackLayoutTest extends testModule.UITest<StackLayout> {
44
44
45
45
TKUnit.assertEqual(this.rootLayout.orientation,CoreTypes.Orientation.vertical,'Default orientation should be Vertical.');
46
46
47
+
// Capture current counts to assert on deltas instead of absolute values.
48
+
// Some platforms may perform extra layout passes, so we only require at least one new pass.
49
+
constbeforeMeasure=this.rootLayout.measureCount;
50
+
constbeforeArrange=this.rootLayout.arrangeCount;
51
+
47
52
this.rootLayout.orientation='horizontal';
48
53
this.waitUntilTestElementLayoutIsValid();
49
54
50
-
TKUnit.assertEqual(this.rootLayout.measureCount,2,'Orientation change should invalidate measure.');
51
-
TKUnit.assertEqual(this.rootLayout.arrangeCount,2,'Orientation change should invalidate arrange.');
55
+
TKUnit.assert(this.rootLayout.measureCount>beforeMeasure,`Orientation change should trigger a new measure. Before: ${beforeMeasure}, After: ${this.rootLayout.measureCount}`);
56
+
TKUnit.assert(this.rootLayout.arrangeCount>beforeArrange,`Orientation change should trigger a new arrange. Before: ${beforeArrange}, After: ${this.rootLayout.arrangeCount}`);
0 commit comments