From 8c70e1023a83dbbcebfd0330b29f637683b82d47 Mon Sep 17 00:00:00 2001 From: tsonevn Date: Wed, 30 Aug 2017 12:00:23 +0300 Subject: [PATCH 1/7] edit broken page snippet tag --- tests/app/ui/page/page.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/app/ui/page/page.md b/tests/app/ui/page/page.md index e550ee14b5..61f6d9d723 100644 --- a/tests/app/ui/page/page.md +++ b/tests/app/ui/page/page.md @@ -16,7 +16,7 @@ Using a page requires the Page module. ``` {%snippet article-set-bindingcontext%} ### Creating and navigating to the created page. -{%snippet artivle-create-navigate-to-page%} +{%snippet article-create-navigate-to-page%} ### Navigating backward is as simple as calling a single method. {%snippet article-navigating-backward%} ### Pass data to the new page. From 3e38eb4b2f931a8a985037f52d31fdf3d09e456e Mon Sep 17 00:00:00 2001 From: Alexander Vakrilov Date: Wed, 30 Aug 2017 13:30:53 +0300 Subject: [PATCH 2/7] Increase timeout for HTTP tests (#4775) --- tests/app/TKUnit.ts | 4 ++-- tests/app/testRunner.ts | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/app/TKUnit.ts b/tests/app/TKUnit.ts index aa06d4302c..103c152bc8 100644 --- a/tests/app/TKUnit.ts +++ b/tests/app/TKUnit.ts @@ -118,13 +118,13 @@ function runAsync(testInfo: TestInfoEntry, recursiveIndex: number, testTimeout?: testInfo.isPassed = true; runTests(testsQueue, recursiveIndex + 1); } else if (error) { - write(`--- ["${testInfo.testName}"] FAILED: ${error.message}, duration: ${duration}`, trace.messageType.error); + write(`--- [${testInfo.testName}] FAILED: ${error.message}, duration: ${duration}`, trace.messageType.error); testInfo.errorMessage = error.message; runTests(testsQueue, recursiveIndex + 1); } else { const testEndTime = time(); if (testEndTime - testStartTime > timeout) { - write(`--- ["${testInfo.testName}"] TIMEOUT, duration: ${duration}`, trace.messageType.error); + write(`--- [${testInfo.testName}] TIMEOUT, duration: ${duration}`, trace.messageType.error); testInfo.errorMessage = "Test timeout."; runTests(testsQueue, recursiveIndex + 1); } else { diff --git a/tests/app/testRunner.ts b/tests/app/testRunner.ts index f98947464a..ed5169e21b 100644 --- a/tests/app/testRunner.ts +++ b/tests/app/testRunner.ts @@ -238,6 +238,10 @@ allTests["SEARCH-BAR"] = searchBarTests; import * as navigationTests from "./navigation/navigation-tests"; allTests["NAVIGATION"] = navigationTests; +const testsSuitesWithLongDelay = { + HTTP: 15 * 1000, +} + const testsWithLongDelay = { testLocation: 10000, testLocationOnce: 10000, @@ -433,7 +437,7 @@ export function runAll(testSelector?: string) { if (test.setUp) { testsQueue.push(new TestInfo(test.setUp, test)); } - const testTimeout = testsWithLongDelay[testName]; + const testTimeout = testsWithLongDelay[testName] || testsSuitesWithLongDelay[name]; testsQueue.push(new TestInfo(testFunction, test, true, name + "." + testName, false, null, testTimeout)); if (test.tearDown) { testsQueue.push(new TestInfo(test.tearDown, test)); From a79a83ce824a9fb2cb5200f65e24816fae9bf5b7 Mon Sep 17 00:00:00 2001 From: Brad Martin Date: Mon, 4 Sep 2017 03:09:36 -0500 Subject: [PATCH 3/7] Typos (#4789) --- tns-core-modules/ui/core/view/view.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tns-core-modules/ui/core/view/view.d.ts b/tns-core-modules/ui/core/view/view.d.ts index 9af4011cd2..0645194d3a 100644 --- a/tns-core-modules/ui/core/view/view.d.ts +++ b/tns-core-modules/ui/core/view/view.d.ts @@ -14,12 +14,12 @@ export * from "../../styling/style-properties"; export function PseudoClassHandler(...pseudoClasses: string[]): MethodDecorator; /** - * Denotes a length number that is in device independent pixels units. + * Denotes a length number that is in device independent pixel units. */ export type dip = number; /** - * Denotes a length number that is in phisical device pixels. + * Denotes a length number that is in physical device pixels. */ export type px = number; @@ -576,7 +576,7 @@ export abstract class View extends ViewBase implements ApplyXmlAttributes { } /** - * Base class for all UI components that implements custom layouts. + * Base class for all UI components that implement custom layouts. */ export class CustomLayoutView extends View { //@private From 28b6eba9acc283a3f16005f603316f8d7efb8fcb Mon Sep 17 00:00:00 2001 From: Alexander Vakrilov Date: Mon, 4 Sep 2017 14:36:34 +0300 Subject: [PATCH 4/7] TypeScript 2.5 compatibility (#4794) --- tns-core-modules/ui/image/image-common.ts | 4 ++-- tns-core-modules/ui/image/image.android.ts | 4 ++-- .../ui/styling/style-properties.ts | 20 +++++++++---------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tns-core-modules/ui/image/image-common.ts b/tns-core-modules/ui/image/image-common.ts index 779f34f3c8..95374b55a0 100644 --- a/tns-core-modules/ui/image/image-common.ts +++ b/tns-core-modules/ui/image/image-common.ts @@ -5,7 +5,7 @@ import { ImageSource, fromAsset, fromNativeSource, fromUrl } from "../../image-s import { isDataURI, isFileOrResourcePath, RESOURCE_PREFIX } from "../../utils/utils"; export * from "../core/view"; -export { ImageSource, fromAsset, fromNativeSource, fromUrl, isDataURI, isFileOrResourcePath, RESOURCE_PREFIX }; +export { ImageSource, ImageAsset, fromAsset, fromNativeSource, fromUrl, isDataURI, isFileOrResourcePath, RESOURCE_PREFIX }; export abstract class ImageBase extends View implements ImageDefinition { public imageSource: ImageSource; @@ -24,7 +24,7 @@ export abstract class ImageBase extends View implements ImageDefinition { /** * @internal */ - public _createImageSourceFromSrc(value: string | ImageSource): void { + public _createImageSourceFromSrc(value: string | ImageSource | ImageAsset): void { const originalValue = value; const sync = this.loadMode === "sync"; if (typeof value === "string" || value instanceof String) { diff --git a/tns-core-modules/ui/image/image.android.ts b/tns-core-modules/ui/image/image.android.ts index 444e7417f5..fb03c78251 100644 --- a/tns-core-modules/ui/image/image.android.ts +++ b/tns-core-modules/ui/image/image.android.ts @@ -1,5 +1,5 @@ import { - ImageSource, ImageBase, stretchProperty, imageSourceProperty, srcProperty, tintColorProperty, Color, + ImageSource, ImageAsset, ImageBase, stretchProperty, imageSourceProperty, srcProperty, tintColorProperty, Color, isDataURI, isFileOrResourcePath, RESOURCE_PREFIX } from "./image-common"; import { knownFolders } from "../../file-system"; @@ -75,7 +75,7 @@ export class Image extends ImageBase { this.nativeViewProtected.setImageMatrix(new android.graphics.Matrix()); } - public _createImageSourceFromSrc(value: string | ImageSource) { + public _createImageSourceFromSrc(value: string | ImageSource | ImageAsset) { const imageView = this.nativeViewProtected; if (!imageView) { return; diff --git a/tns-core-modules/ui/styling/style-properties.ts b/tns-core-modules/ui/styling/style-properties.ts index 9e4ba90184..7165ab0c94 100644 --- a/tns-core-modules/ui/styling/style-properties.ts +++ b/tns-core-modules/ui/styling/style-properties.ts @@ -1,5 +1,5 @@ // Types -import { +import { Transformation, TransformationValue, TransformFunctionsInfo, @@ -456,13 +456,13 @@ const TRANSFORMATIONS = Object.freeze([ const STYLE_TRANSFORMATION_MAP = Object.freeze({ "scale": value => ({ property: "scale", value }), "scale3d": value => ({ property: "scale", value }), - "scaleX": ({x}) => ({ property: "scale", value: { x, y: IDENTITY_TRANSFORMATION.scale.y } }), - "scaleY": ({y}) => ({ property: "scale", value: { y, x: IDENTITY_TRANSFORMATION.scale.x } }), + "scaleX": ({ x }) => ({ property: "scale", value: { x, y: IDENTITY_TRANSFORMATION.scale.y } }), + "scaleY": ({ y }) => ({ property: "scale", value: { y, x: IDENTITY_TRANSFORMATION.scale.x } }), "translate": value => ({ property: "translate", value }), "translate3d": value => ({ property: "translate", value }), - "translateX": ({x}) => ({ property: "translate", value: { x, y: IDENTITY_TRANSFORMATION.translate.y } }), - "translateY": ({y}) => ({ property: "translate", value: { y, x: IDENTITY_TRANSFORMATION.translate.x } }), + "translateX": ({ x }) => ({ property: "translate", value: { x, y: IDENTITY_TRANSFORMATION.translate.y } }), + "translateY": ({ y }) => ({ property: "translate", value: { y, x: IDENTITY_TRANSFORMATION.translate.x } }), "rotate": value => ({ property: "rotate", value }), }); @@ -501,12 +501,12 @@ export function transformConverter(text: string): TransformFunctionsInfo { return fullTransformations; } - const affineMatrix = transformations + const affineMatrix = transformations .map(getTransformMatrix) .reduce(multiplyAffine2d) - const cssMatrix = matrixArrayToCssMatrix(affineMatrix) + const cssMatrix = matrixArrayToCssMatrix(affineMatrix) - return decompose2DTransformMatrix(cssMatrix); + return decompose2DTransformMatrix(cssMatrix); } // using general regex and manually checking the matched @@ -528,8 +528,8 @@ function parseTransformString(text: string): Transformation[] { return matches; } -function normalizeTransformation({ property, value }: Transformation) { - return STYLE_TRANSFORMATION_MAP[property](value); +function normalizeTransformation({ property, value }: Transformation): Transformation { + return STYLE_TRANSFORMATION_MAP[property](value); } function convertTransformValue(property: string, stringValue: string) From f03803cd8ccf9056c046642bbeb19baccc2dd6c0 Mon Sep 17 00:00:00 2001 From: tsonevn Date: Wed, 30 Aug 2017 12:00:23 +0300 Subject: [PATCH 5/7] edit broken page snippet tag --- tests/app/ui/page/page.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/app/ui/page/page.md b/tests/app/ui/page/page.md index e550ee14b5..61f6d9d723 100644 --- a/tests/app/ui/page/page.md +++ b/tests/app/ui/page/page.md @@ -16,7 +16,7 @@ Using a page requires the Page module. ``` {%snippet article-set-bindingcontext%} ### Creating and navigating to the created page. -{%snippet artivle-create-navigate-to-page%} +{%snippet article-create-navigate-to-page%} ### Navigating backward is as simple as calling a single method. {%snippet article-navigating-backward%} ### Pass data to the new page. From d0b3e0c536ba5c0959c0477180de9f7680d7b4f3 Mon Sep 17 00:00:00 2001 From: Alexander Vakrilov Date: Tue, 5 Sep 2017 13:42:06 +0300 Subject: [PATCH 6/7] fix(date-picker): Date picker changed check (#4797) --- tns-core-modules/ui/date-picker/date-picker.android.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tns-core-modules/ui/date-picker/date-picker.android.ts b/tns-core-modules/ui/date-picker/date-picker.android.ts index 36782dda44..c85b159a61 100644 --- a/tns-core-modules/ui/date-picker/date-picker.android.ts +++ b/tns-core-modules/ui/date-picker/date-picker.android.ts @@ -102,7 +102,7 @@ export class DatePicker extends DatePickerBase { [dateProperty.setNative](value: Date) { const nativeView = this.nativeViewProtected; - if (nativeView.getDayOfMonth() !== value.getDay() + if (nativeView.getDayOfMonth() !== value.getDate() || nativeView.getMonth() !== value.getMonth() || nativeView.getYear() !== value.getFullYear()) { nativeView.updateDate(value.getFullYear(), value.getMonth(), value.getDate()); From 6ce6074e2a9636079519afd36a20781a5c527f39 Mon Sep 17 00:00:00 2001 From: tsonevn Date: Wed, 30 Aug 2017 12:00:23 +0300 Subject: [PATCH 7/7] edit broken page snippet tag --- tests/app/ui/page/page.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/app/ui/page/page.md b/tests/app/ui/page/page.md index e550ee14b5..61f6d9d723 100644 --- a/tests/app/ui/page/page.md +++ b/tests/app/ui/page/page.md @@ -16,7 +16,7 @@ Using a page requires the Page module. ``` {%snippet article-set-bindingcontext%} ### Creating and navigating to the created page. -{%snippet artivle-create-navigate-to-page%} +{%snippet article-create-navigate-to-page%} ### Navigating backward is as simple as calling a single method. {%snippet article-navigating-backward%} ### Pass data to the new page.