11import * as TKUnit from "../../TKUnit" ;
22import * as app from "tns-core-modules/application" ;
33import * as button from "tns-core-modules/ui/button" ;
4- import * as enums from "tns-core-modules/ui/enums" ;
54import * as testModule from "../../ui-test" ;
65import * as layoutHelper from "../layouts/layout-helper" ;
7- import { Page } from "tns-core-modules/ui/page" ;
6+ import { Page } from "tns-core-modules/ui/page" ;
87import * as frame from "tns-core-modules/ui/frame" ;
98
109// >> article-require-scrollview-module
@@ -15,7 +14,7 @@ class ScrollLayoutTest extends testModule.UITest<scrollViewModule.ScrollView> {
1514
1615 public create ( ) : scrollViewModule . ScrollView {
1716 let scrollView = new scrollViewModule . ScrollView ( ) ;
18- scrollView . orientation = enums . Orientation . vertical ;
17+ scrollView . orientation = " vertical" ;
1918
2019 scrollView . width = { value : 200 , unit : "px" } ;
2120 scrollView . height = { value : 300 , unit : "px" } ;
@@ -38,13 +37,13 @@ class ScrollLayoutTest extends testModule.UITest<scrollViewModule.ScrollView> {
3837
3938 public test_default_TNS_values ( ) {
4039 let scroll = new scrollViewModule . ScrollView ( ) ;
41- TKUnit . assertEqual ( scroll . orientation , enums . Orientation . vertical , "Default this.testView.orientation" ) ;
40+ TKUnit . assertEqual ( scroll . orientation , " vertical" , "Default this.testView.orientation" ) ;
4241 TKUnit . assertEqual ( scroll . verticalOffset , 0 , "Default this.testView.verticalOffset" ) ;
4342 TKUnit . assertEqual ( scroll . horizontalOffset , 0 , "Default this.testView.horizontalOffset" ) ;
4443 }
4544
4645 public test_vertical_oriantation_creates_correct_native_view ( ) {
47- this . testView . orientation = enums . Orientation . vertical ;
46+ this . testView . orientation = " vertical" ;
4847
4948 if ( app . android ) {
5049 TKUnit . assert ( this . testView . android instanceof org . nativescript . widgets . VerticalScrollView , "android property should be instanceof org.nativescript.widgets.VerticalScrollView" ) ;
@@ -55,7 +54,7 @@ class ScrollLayoutTest extends testModule.UITest<scrollViewModule.ScrollView> {
5554 }
5655
5756 public test_horizontal_oriantation_creates_correct_native_view ( ) {
58- this . testView . orientation = enums . Orientation . horizontal ;
57+ this . testView . orientation = " horizontal" ;
5958
6059 if ( app . android ) {
6160 TKUnit . assert ( this . testView . android instanceof org . nativescript . widgets . HorizontalScrollView , "android property should be instanceof org.nativescript.widgets.HorizontalScrollView" ) ;
@@ -83,7 +82,7 @@ class ScrollLayoutTest extends testModule.UITest<scrollViewModule.ScrollView> {
8382 }
8483
8584 public test_scrollableWidth_horizontal_orientation_when_content_is_small ( ) {
86- this . testView . orientation = enums . Orientation . horizontal ;
85+ this . testView . orientation = " horizontal" ;
8786 this . testView . content . width = { value : 100 , unit : "px" } ;
8887 this . testView . content . height = { value : 100 , unit : "px" } ;
8988 this . waitUntilTestElementLayoutIsValid ( ) ;
@@ -93,7 +92,7 @@ class ScrollLayoutTest extends testModule.UITest<scrollViewModule.ScrollView> {
9392 }
9493
9594 public test_scrollableWidth_horizontal_orientation_when_content_is_big ( ) {
96- this . testView . orientation = enums . Orientation . horizontal ;
95+ this . testView . orientation = " horizontal" ;
9796 this . testView . content . height = { value : 100 , unit : "px" } ;
9897 this . waitUntilTestElementLayoutIsValid ( ) ;
9998
@@ -125,7 +124,7 @@ class ScrollLayoutTest extends testModule.UITest<scrollViewModule.ScrollView> {
125124 }
126125
127126 public test_scrollToHorizontalOffset_no_animation ( ) {
128- this . testView . orientation = enums . Orientation . horizontal ;
127+ this . testView . orientation = " horizontal" ;
129128 this . waitUntilTestElementLayoutIsValid ( ) ;
130129
131130 TKUnit . assertEqual ( this . testView . horizontalOffset , 0 , "this.testView.horizontalOffset" ) ;
@@ -134,7 +133,7 @@ class ScrollLayoutTest extends testModule.UITest<scrollViewModule.ScrollView> {
134133 }
135134
136135 public test_scrollToHorizontalOffset_with_animation ( ) {
137- this . testView . orientation = enums . Orientation . horizontal ;
136+ this . testView . orientation = " horizontal" ;
138137 this . waitUntilTestElementLayoutIsValid ( ) ;
139138
140139 TKUnit . assertEqual ( this . testView . horizontalOffset , 0 , "this.testView.horizontalOffset" ) ;
@@ -173,7 +172,7 @@ class ScrollLayoutTest extends testModule.UITest<scrollViewModule.ScrollView> {
173172 }
174173
175174 public test_scrollView_persistsState_horizontal ( ) {
176- this . testView . orientation = enums . Orientation . horizontal ;
175+ this . testView . orientation = " horizontal" ;
177176 this . waitUntilTestElementLayoutIsValid ( ) ;
178177
179178 this . testView . scrollToHorizontalOffset ( layoutHelper . dp ( 100 ) , false ) ;
@@ -211,7 +210,7 @@ class ScrollLayoutTest extends testModule.UITest<scrollViewModule.ScrollView> {
211210 }
212211
213212 public test_scrollView_horizontal_raised_scroll_event ( ) {
214- this . testView . orientation = enums . Orientation . horizontal ;
213+ this . testView . orientation = " horizontal" ;
215214
216215 var scrollX : number ;
217216 this . testView . on ( scrollViewModule . ScrollView . scrollEvent , ( args : scrollViewModule . ScrollEventData ) => {
@@ -240,7 +239,7 @@ class ScrollLayoutTest extends testModule.UITest<scrollViewModule.ScrollView> {
240239 }
241240
242241 public test_scrollView_horizontal_raised_scroll_event_after_loaded ( ) {
243- this . testView . orientation = enums . Orientation . horizontal ;
242+ this . testView . orientation = " horizontal" ;
244243 this . waitUntilTestElementLayoutIsValid ( ) ;
245244
246245 var scrollX : number ;
0 commit comments