@@ -139,7 +139,7 @@ export function test_class_selector() {
139139
140140 //// Will be styled
141141 btnWithClass = new buttonModule . Button ( ) ;
142- btnWithClass . cssClass = "test" ;
142+ btnWithClass . className = "test" ;
143143
144144 //// Won't be styled
145145 btnWithNoClass = new buttonModule . Button ( ) ;
@@ -172,7 +172,7 @@ export function test_multiple_class_selector() {
172172
173173 //// Will be styled
174174 btnWithClasses = new buttonModule . Button ( ) ;
175- btnWithClasses . cssClass = "style1 style2" ;
175+ btnWithClasses . className = "style1 style2" ;
176176
177177 var stack = new stackModule . StackLayout ( ) ;
178178 page . content = stack ;
@@ -290,7 +290,7 @@ export function test_class_and_state_selector() {
290290 page . content = testStack ;
291291
292292 btn = new buttonModule . Button ( ) ;
293- btn . cssClass = "test"
293+ btn . className = "test"
294294 testStack . addChild ( btn ) ;
295295
296296 page . css = ".test:pressed { color: red; }" ;
@@ -315,7 +315,7 @@ export function test_class_and_state_selector_with_multiple_classes() {
315315 page . content = testStack ;
316316
317317 btn = new buttonModule . Button ( ) ;
318- btn . cssClass = "test otherClass"
318+ btn . className = "test otherClass"
319319 testStack . addChild ( btn ) ;
320320
321321 page . css = ".test:pressed { color: red; }" ;
@@ -392,14 +392,14 @@ export function test_restore_original_values_when_state_is_changed() {
392392// testPage.content = testStack;
393393
394394// var btnWithClass = new button.Button();
395- // btnWithClass.cssClass = "test";
395+ // btnWithClass.className = "test";
396396// testStack.addChild(btnWithClass);
397397
398398// var btnWithNoClass = new button.Button();
399399// testStack.addChild(btnWithNoClass);
400400
401401// var lblWithClass = new label.Label();
402- // lblWithClass.cssClass = "test";
402+ // lblWithClass.className = "test";
403403// testStack.addChild(lblWithClass);
404404
405405// testPage.css = "button.test { color: red; }";
@@ -431,14 +431,14 @@ export function test_restore_original_values_when_state_is_changed() {
431431// testPage.content = testStack;
432432
433433// var btnWithClass = new button.Button();
434- // btnWithClass.cssClass = "test";
434+ // btnWithClass.className = "test";
435435// testStack.addChild(btnWithClass);
436436
437437// var btnWithNoClass = new button.Button();
438438// testStack.addChild(btnWithNoClass);
439439
440440// var lblWithClass = new label.Label();
441- // lblWithClass.cssClass = "test";
441+ // lblWithClass.className = "test";
442442// testStack.addChild(lblWithClass);
443443
444444// testPage.css = "button.test:pressed { color: red; }";
@@ -506,7 +506,7 @@ export function test_styles_are_updated_when_cssCalss_is_set() {
506506 helper . assertViewBackgroundColor ( btn , "#111111" ) ;
507507 helper . assertViewBackgroundColor ( btn2 , "#111111" ) ;
508508
509- btn . cssClass = "button-class" ;
509+ btn . className = "button-class" ;
510510
511511 helper . assertViewBackgroundColor ( btn , "#222222" ) ;
512512 helper . assertViewBackgroundColor ( btn2 , "#111111" ) ;
@@ -518,7 +518,7 @@ export function test_styles_are_updated_when_cssCalss_is_set() {
518518export function test_styles_are_updated_when_cssCalss_is_changed ( ) {
519519 var testStack = new stackModule . StackLayout ( ) ;
520520 var btn = new buttonModule . Button ( ) ;
521- btn . cssClass = "button-class" ;
521+ btn . className = "button-class" ;
522522 var btn2 = new buttonModule . Button ( ) ;
523523 testStack . addChild ( btn ) ;
524524 testStack . addChild ( btn2 ) ;
@@ -527,7 +527,7 @@ export function test_styles_are_updated_when_cssCalss_is_changed() {
527527 helper . assertViewBackgroundColor ( btn , "#222222" ) ;
528528 helper . assertViewBackgroundColor ( btn2 , "#111111" ) ;
529529
530- btn . cssClass = "button-class-two" ;
530+ btn . className = "button-class-two" ;
531531
532532 helper . assertViewBackgroundColor ( btn , "#333333" ) ;
533533 helper . assertViewBackgroundColor ( btn2 , "#111111" ) ;
@@ -539,7 +539,7 @@ export function test_styles_are_updated_when_cssCalss_is_changed() {
539539export function test_styles_are_updated_when_cssCalss_is_cleared ( ) {
540540 var testStack = new stackModule . StackLayout ( ) ;
541541 var btn = new buttonModule . Button ( ) ;
542- btn . cssClass = "button-class" ;
542+ btn . className = "button-class" ;
543543 var btn2 = new buttonModule . Button ( ) ;
544544 testStack . addChild ( btn ) ;
545545 testStack . addChild ( btn2 ) ;
@@ -548,7 +548,7 @@ export function test_styles_are_updated_when_cssCalss_is_cleared() {
548548 helper . assertViewBackgroundColor ( btn , "#222222" ) ;
549549 helper . assertViewBackgroundColor ( btn2 , "#111111" ) ;
550550
551- btn . cssClass = undefined ;
551+ btn . className = undefined ;
552552
553553 helper . assertViewBackgroundColor ( btn , "#111111" ) ;
554554 helper . assertViewBackgroundColor ( btn2 , "#111111" ) ;
@@ -661,11 +661,11 @@ function testSelectorsPrioritiesTemplate(css: string) {
661661 testStack . addChild ( btn ) ;
662662
663663 btnWithClass = new buttonModule . Button ( ) ;
664- btnWithClass . cssClass = "button-class" ;
664+ btnWithClass . className = "button-class" ;
665665 testStack . addChild ( btnWithClass ) ;
666666
667667 btnWithId = new buttonModule . Button ( ) ;
668- btnWithId . cssClass = "button-class" ;
668+ btnWithId . className = "button-class" ;
669669 btnWithId . id = "myButton"
670670 testStack . addChild ( btnWithId ) ;
671671
@@ -817,7 +817,7 @@ var invalidCSS = ".invalid { " +
817817export function test_set_invalid_CSS_values_dont_cause_crash ( ) {
818818 var testButton = new buttonModule . Button ( ) ;
819819 testButton . text = "Test" ;
820- testButton . cssClass = "invalid" ;
820+ testButton . className = "invalid" ;
821821
822822 helper . buildUIAndRunTest ( testButton , function ( views : Array < viewModule . View > ) {
823823 TKUnit . assertEqual ( 30 , testButton . style . fontSize ) ;
@@ -834,7 +834,7 @@ var casedCSS = ".cased {" +
834834export function test_set_mixed_CSS_cases_works ( ) {
835835 var testButton = new buttonModule . Button ( ) ;
836836 testButton . text = "Test" ;
837- testButton . cssClass = "cased" ;
837+ testButton . className = "cased" ;
838838
839839 helper . buildUIAndRunTest ( testButton , function ( views : Array < viewModule . View > ) {
840840 TKUnit . assertEqual ( 30 , testButton . style . fontSize ) ;
0 commit comments