@@ -10,7 +10,7 @@ import * as colorModule from '@nativescript/core/color';
10
10
import * as utils from '@nativescript/core/utils' ;
11
11
import * as observableModule from '@nativescript/core/data/observable' ;
12
12
import * as bindable from '@nativescript/core/ui/core/bindable' ;
13
- import { CoreTypes , Span , FormattedString } from '@nativescript/core' ;
13
+ import { CoreTypes , Span , FormattedString , Utils } from '@nativescript/core' ;
14
14
import * as labelTestsNative from './label-tests-native' ;
15
15
import * as fs from '@nativescript/core/file-system' ;
16
16
@@ -23,6 +23,8 @@ import * as helper from '../../ui-helper';
23
23
24
24
const testDir = 'ui/label' ;
25
25
26
+ const expectLayoutRequest = __APPLE__ && Utils . SDK_VERSION >= 18 ;
27
+
26
28
export class LabelTest extends testModule . UITest < LabelModule . Label > {
27
29
public create ( ) : LabelModule . Label {
28
30
const label = new LabelModule . Label ( ) ;
@@ -633,7 +635,7 @@ export class LabelTest extends testModule.UITest<LabelModule.Label> {
633
635
}
634
636
635
637
public test_SettingTextWhenInFixedSizeGridShouldNotRequestLayout ( ) {
636
- this . requestLayoutFixture ( false , '' , ( label ) => {
638
+ this . requestLayoutFixture ( expectLayoutRequest , '' , ( label ) => {
637
639
label . textWrap = false ;
638
640
let host = new GridLayout ( ) ;
639
641
host . width = 100 ;
@@ -644,7 +646,7 @@ export class LabelTest extends testModule.UITest<LabelModule.Label> {
644
646
}
645
647
646
648
public test_ChangingTextWhenInFixedSizeGridShouldNotRequestLayout ( ) {
647
- this . requestLayoutFixture ( false , 'Hello World' , ( label ) => {
649
+ this . requestLayoutFixture ( expectLayoutRequest , 'Hello World' , ( label ) => {
648
650
label . textWrap = false ;
649
651
let host = new GridLayout ( ) ;
650
652
host . width = 100 ;
@@ -655,7 +657,7 @@ export class LabelTest extends testModule.UITest<LabelModule.Label> {
655
657
}
656
658
657
659
public test_SettingTextWhenFixedWidthAndHeightDoesNotRequestLayout ( ) {
658
- this . requestLayoutFixture ( false , '' , ( label ) => {
660
+ this . requestLayoutFixture ( expectLayoutRequest , '' , ( label ) => {
659
661
label . textWrap = false ;
660
662
let host = new StackLayout ( ) ;
661
663
label . width = 100 ;
@@ -666,7 +668,7 @@ export class LabelTest extends testModule.UITest<LabelModule.Label> {
666
668
}
667
669
668
670
public test_ChangingTextWhenFixedWidthAndHeightDoesNotRequestLayout ( ) {
669
- this . requestLayoutFixture ( false , 'Hello World' , ( label ) => {
671
+ this . requestLayoutFixture ( expectLayoutRequest , 'Hello World' , ( label ) => {
670
672
label . textWrap = false ;
671
673
let host = new StackLayout ( ) ;
672
674
label . width = 100 ;
@@ -707,7 +709,7 @@ export class LabelTest extends testModule.UITest<LabelModule.Label> {
707
709
}
708
710
709
711
public test_ChangingTextOnSingleLineTextWhenWidthIsSizedToParentAndHeightIsSizedToContentShouldNotRequestLayout ( ) {
710
- this . requestLayoutFixture ( false , 'Hello World' , ( label ) => {
712
+ this . requestLayoutFixture ( expectLayoutRequest , 'Hello World' , ( label ) => {
711
713
label . textWrap = false ;
712
714
let host = new StackLayout ( ) ;
713
715
host . width = 100 ;
0 commit comments