From 5f14fc6a238b6aef68f2881f45c3ceacae41e3ce Mon Sep 17 00:00:00 2001 From: Hristo Hristov Date: Tue, 4 Apr 2017 13:50:34 +0300 Subject: [PATCH] =?UTF-8?q?text-decoration=20won=E2=80=99t=20be=20applied?= =?UTF-8?q?=20to=20edit-text=20(#3932)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * text-decoration won’t be applied to edit-text * stop printing slow tests * remove console line * fix failing tests * fix wrong checks --- tests/app/testRunner.ts | 12 ++--- .../app/ui/styling/style-properties-tests.ts | 44 +++++++++++-------- .../editable-text-base.android.ts | 8 +++- 3 files changed, 38 insertions(+), 26 deletions(-) diff --git a/tests/app/testRunner.ts b/tests/app/testRunner.ts index 4988877e4..b09f8b24f 100644 --- a/tests/app/testRunner.ts +++ b/tests/app/testRunner.ts @@ -320,12 +320,12 @@ function printRunTestStats() { testFile.writeTextSync(testFileContent.join("")); finalMessage += "\n" + "Test results: " + testFilePath; - finalMessage += "\n" + "----------------- "; - finalMessage += "\n" + "Slow tests: "; - slowTests.forEach((message, i, arr) => { - TKUnit.write(message, messageType.error); - finalMessage += "\n" + message; - }); + // finalMessage += "\n" + "----------------- "; + // finalMessage += "\n" + "Slow tests: "; + // slowTests.forEach((message, i, arr) => { + // TKUnit.write(message, messageType.error); + // finalMessage += "\n" + message; + // }); let stack = new StackLayout(); let btn = new Button(); diff --git a/tests/app/ui/styling/style-properties-tests.ts b/tests/app/ui/styling/style-properties-tests.ts index 29d080723..840432f2b 100644 --- a/tests/app/ui/styling/style-properties-tests.ts +++ b/tests/app/ui/styling/style-properties-tests.ts @@ -729,19 +729,23 @@ export const test_setting_label_textTransform_sets_native = function () { }; export const test_setting_textField_textTransform_sets_native = function () { - const testView = new TextField(); - testView.text = initial; - testView.style.textTransform = "capitalize"; + if (isIOS) { + const testView = new TextField(); + testView.text = initial; + testView.style.textTransform = "capitalize"; - executeTransformTest(testView, androidText, iOSText); + executeTransformTest(testView, androidText, iOSText); + } }; export const test_setting_textView_textTransform_sets_native = function () { - const testView = new TextView(); - testView.text = initial; - testView.style.textTransform = "capitalize"; + if (isIOS) { + const testView = new TextView(); + testView.text = initial; + testView.style.textTransform = "capitalize"; - executeTransformTest(testView, androidText, iOSText); + executeTransformTest(testView, androidText, iOSText); + } }; export const test_setting_button_textTransform_sets_native = function () { @@ -762,21 +766,25 @@ export const test_setting_label_textTransform_and_textDecoration_sets_native = f }; export const test_setting_textField_textTransform_and_textDecoration_sets_native = function () { - const testView = new TextField(); - testView.text = initial; - testView.style.textTransform = "capitalize"; - testView.style.textDecoration = "underline"; + if (isIOS) { + const testView = new TextField(); + testView.text = initial; + testView.style.textTransform = "capitalize"; + testView.style.textDecoration = "underline"; - executeTransformTest(testView, androidText, iOSText); + executeTransformTest(testView, androidText, iOSText); + } }; export const test_setting_textView_textTransform_and_textDecoration_sets_native = function () { - const testView = new TextView(); - testView.text = initial; - testView.style.textTransform = "capitalize"; - testView.style.textDecoration = "underline"; + if (isIOS) { + const testView = new TextView(); + testView.text = initial; + testView.style.textTransform = "capitalize"; + testView.style.textDecoration = "underline"; - executeTransformTest(testView, androidText, iOSText); + executeTransformTest(testView, androidText, iOSText); + } }; export const test_setting_button_textTransform_and_textDecoration_sets_native = function () { diff --git a/tns-core-modules/ui/editable-text-base/editable-text-base.android.ts b/tns-core-modules/ui/editable-text-base/editable-text-base.android.ts index 6ae1e7028..2723dc358 100644 --- a/tns-core-modules/ui/editable-text-base/editable-text-base.android.ts +++ b/tns-core-modules/ui/editable-text-base/editable-text-base.android.ts @@ -2,7 +2,7 @@ EditableTextBase as EditableTextBaseCommon, keyboardTypeProperty, returnKeyTypeProperty, editableProperty, autocapitalizationTypeProperty, autocorrectProperty, hintProperty, - textProperty, placeholderColorProperty, Color + textProperty, placeholderColorProperty, Color, textTransformProperty } from "./editable-text-base-common"; import { ad } from "../../utils/utils"; @@ -410,4 +410,8 @@ export abstract class EditableTextBase extends EditableTextBaseCommon { this.nativeView.setHintTextColor(value); } } -} + + [textTransformProperty.setNative](value: "default") { + // + } +} \ No newline at end of file