Fixed(IOS): Setting placeholder color on text filed crashes if no hint is set

This commit is contained in:
vakrilov
2016-12-05 15:16:21 +02:00
parent fee1dd9a59
commit 8101a68c25
2 changed files with 34 additions and 19 deletions

View File

@@ -575,4 +575,14 @@ export function test_set_placeholder_color() {
let actualColorHex = textFieldTestsNative.getNativePlaceholderColor(view).hex;
TKUnit.assertEqual(actualColorHex, expectedColorHex);
});
}
export function test_set_placeholder_color_when_hint_is_not_set() {
let view = new textFieldModule.TextField();
let expectedColorHex = "#ffff0000";
helper.buildUIAndRunTest(view, function (views: Array<viewModule.View>) {
view.setInlineStyle("placeholder-color: " + expectedColorHex + ";");
let actualColorHex = textFieldTestsNative.getNativePlaceholderColor(view).hex;
TKUnit.assertEqual(actualColorHex, expectedColorHex);
});
}