From a64bba62aa29c520923e218237e1c158fb93e25f Mon Sep 17 00:00:00 2001 From: Hristo Hristov Date: Tue, 14 Mar 2017 10:26:45 +0200 Subject: [PATCH] whiteSpace default value change to undefined (#3782) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TKUnit default message change to empty string isSet method is now instance method of Property classes fix detaching from parent bindingContext - were using oldParent.parent instead of parent editable-text-base.android - onTextChanged implementation commented. Does nothing. frame - onCreateView wrapped in try/catch and shows label with exception message if any text-base.android - should support reset of nativeView. TransformationMethod won’t be set if TextField is secure Change some types to their string couterparts TextField.android won’t support multilines anymore in order to work as iOS In android when page is removed from native backstack we won’t call tearDownUI again a second time --- tests/app/TKUnit.ts | 2 +- tests/app/ui/bindable-tests.ts | 3 +- .../app/ui/styling/style-properties-tests.ts | 37 +- tns-core-modules/text/formatted-string.ts | 2 - tns-core-modules/ui/button/button.android.ts | 10 +- .../ui/core/properties/properties.d.ts | 56 +-- .../ui/core/properties/properties.ts | 18 +- .../ui/core/view-base/view-base.ts | 27 +- .../editable-text-base.android.ts | 10 +- tns-core-modules/ui/frame/frame.android.ts | 17 +- .../ui/text-base/text-base-common.ts | 28 +- .../ui/text-base/text-base.android.ts | 323 ++++++++++-------- .../ui/text-base/text-base.ios.ts | 60 ++-- .../ui/text-field/text-field.android.ts | 19 +- .../ui/transition/transition.android.ts | 5 +- 15 files changed, 314 insertions(+), 303 deletions(-) diff --git a/tests/app/TKUnit.ts b/tests/app/TKUnit.ts index 909dda6ef..0f80de5d0 100644 --- a/tests/app/TKUnit.ts +++ b/tests/app/TKUnit.ts @@ -214,7 +214,7 @@ export function assertNotEqual(actual: any, expected: any, message?: string) { } } -export function assertEqual(actual: T, expected: T, message?: string) { +export function assertEqual(actual: T, expected: T, message: string = '') { if (!types.isNullOrUndefined(actual) && !types.isNullOrUndefined(expected) && types.getClass(actual) === types.getClass(expected) diff --git a/tests/app/ui/bindable-tests.ts b/tests/app/ui/bindable-tests.ts index 267f56182..d9a03ae9d 100644 --- a/tests/app/ui/bindable-tests.ts +++ b/tests/app/ui/bindable-tests.ts @@ -508,18 +508,17 @@ export function test_TwoElementsBindingToSameBindingContext() { export function test_BindingContext_NavigatingForwardAndBack() { const expectedValue = "Tralala"; + const moduleName = __dirname.substr(fs.knownFolders.currentApp().path.length); const testFunc = function (page: Page) { const innerTestFunc = function (childPage: Page) { const testTextField: TextField = (childPage.getViewById("testTextField")); testTextField.text = expectedValue; }; - const moduleName = __dirname.substr(fs.knownFolders.currentApp().path.length); helper.navigateToModuleAndRunTest(("." + moduleName + "/bindingContext_testPage2"), page.bindingContext, innerTestFunc); const testLabel: Label =