File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
apps/tests/xml-declaration Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -135,22 +135,22 @@ export function test_loadWithOptionsFromTNSPath() {
135
135
136
136
export function test_loadWithAttributes ( ) {
137
137
var lText = "Nativescript rocks" ;
138
- var lWrap = true ;
139
138
var lColor = "#FF0000" ; // red
139
+
140
140
var v = builder . load ( {
141
- path : "tns_modules/ui/label" ,
142
- name : "Label" ,
141
+ path : "~/xml-declaration/mymodulewithxml" ,
142
+ name : "MyControl" ,
143
+ page : new Page ( ) ,
143
144
attributes : {
144
- text : lText ,
145
- textWrap : lWrap ,
145
+ customAttribute : {
146
+ text : lText
147
+ } ,
146
148
style : "background-color: " + lColor + ";"
147
149
}
148
150
} ) ;
149
151
150
- TKUnit . assert ( v instanceof Label , "Expected result: Label; Actual result: " + v + ";" ) ;
151
- TKUnit . assertEqual ( v . text , lText , "Expected result: true; Actual result: " + false + ";" ) ;
152
- TKUnit . assertEqual ( v . textWrap , lWrap , "Expected result: true; Actual result: " + false + ";" ) ;
153
- helper . assertViewColor ( v , lColor , "Expected result: true; Actual result: " + false + ";" ) ;
152
+ TKUnit . assertEqual ( v . customAttribute . text , lText , "Expected result: true; Actual result: " + v + ";" ) ;
153
+ helper . assertViewBackgroundColor ( v , lColor , "Expected result: true; Actual result: " + false + ";" ) ;
154
154
} ;
155
155
156
156
export function test_parse_ShouldNotCrashWithoutExports ( ) {
You can’t perform that action at this time.
0 commit comments