mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-18 13:51:27 +08:00
Added a style test to test mixed, upper and lower case property names.
This commit is contained in:
@ -816,6 +816,26 @@ export function test_set_invalid_CSS_values_dont_cause_crash() {
|
|||||||
}, invalidCSS);
|
}, invalidCSS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check Mixed, Upper and lower case properties
|
||||||
|
var casedCSS = ".cased {" +
|
||||||
|
"cOlOr: blue; " +
|
||||||
|
"FONT-SIZE: 30; " +
|
||||||
|
"background-color: red; " +
|
||||||
|
"}";
|
||||||
|
|
||||||
|
export function test_set_mixed_CSS_cases_works() {
|
||||||
|
var testButton = new buttonModule.Button();
|
||||||
|
testButton.text = "Test";
|
||||||
|
testButton.cssClass = "cased";
|
||||||
|
|
||||||
|
helper.buildUIAndRunTest(testButton, function (views: Array<viewModule.View>) {
|
||||||
|
TKUnit.assertEqual(30, testButton.style.fontSize);
|
||||||
|
helper.assertViewBackgroundColor(testButton, "#FF0000");
|
||||||
|
helper.assertViewColor(testButton, "#0000FF");
|
||||||
|
}, casedCSS);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// <snippet module="ui/styling" title="styling">
|
// <snippet module="ui/styling" title="styling">
|
||||||
// For information and example how to use style properties please refer to special [**Styling**](../../../styling.md) topic.
|
// For information and example how to use style properties please refer to special [**Styling**](../../../styling.md) topic.
|
||||||
// </snippet>
|
// </snippet>
|
||||||
|
Reference in New Issue
Block a user