From 7b5ef052fd03cf45945776ad01867ae9ec71c73f Mon Sep 17 00:00:00 2001 From: Hristo Hristov Date: Wed, 15 Mar 2017 12:26:54 +0200 Subject: [PATCH] Tests moved into separate folders (#3794) Fix android crash on application exit --- .../Android/drawable-nodpi/icon.png | Bin 0 -> 10946 bytes .../application-settings-tests.ts | 2 +- .../application-settings.md | 0 .../application-tests-common.ts | 2 +- .../application-tests.android.ts | 2 +- tests/app/application/application-tests.d.ts | 3 + .../application-tests.ios.ts | 2 +- tests/app/{ => application}/application.md | 0 tests/app/{ => color}/color-tests.ts | 2 +- tests/app/{ => color}/color.md | 0 .../{ => connectivity}/connectivity-tests.ts | 0 tests/app/{ => connectivity}/connectivity.md | 0 tests/app/{ => console}/console-tests.ts | 0 tests/app/{ => console}/console.md | 0 tests/app/{ => fetch}/fetch-tests.ts | 2 +- tests/app/{ => fetch}/fetch.md | 0 .../{ => file-system}/file-system-tests.ts | 2 +- tests/app/{ => file-system}/file-system.md | 0 tests/app/{ => fps-meter}/fps-meter-tests.ts | 0 tests/app/{ => fps-meter}/fps-meter.md | 0 tests/app/{ => http}/http-string-worker.ts | 0 tests/app/{ => http}/http-tests.ts | 2 +- tests/app/{ => http}/http.md | 0 .../{ => image-source}/image-source-tests.ts | 13 +- tests/app/{ => image-source}/image-source.md | 0 tests/app/{ => platform}/platform-tests.ts | 2 +- tests/app/{ => platform}/platform.md | 0 tests/app/testRunner.ts | 274 +++++++++++++----- tests/app/{ => timer}/timer-tests.ts | 2 +- tests/app/{ => timer}/timer.md | 0 tests/app/{ => trace}/trace-tests.ts | 0 tests/app/{ => trace}/trace.md | 0 .../ui/action-bar/action-bar-tests-common.ts | 9 +- tests/app/ui/action-bar/action-bar-tests.d.ts | 3 + tests/app/ui/border/border-tests.ts | 5 +- .../ui/{ => core/bindable}/bindable-tests.ts | 13 +- .../bindable}/binding-expressions-tests.ts | 6 +- .../bindable}/bindingContext_testPage.ts | 0 .../bindable}/bindingContext_testPage.xml | 0 .../bindable}/bindingContext_testPage1.ts | 0 .../bindable}/bindingContext_testPage1.xml | 0 .../bindable}/bindingContext_testPage2.ts | 0 .../bindable}/bindingContext_testPage2.xml | 0 .../weak-event-listener-tests.ts | 4 +- tests/app/ui/frame/frame-tests.d.ts | 3 + tests/app/ui/page/page-tests.d.ts | 3 + tests/app/ui/repeater/repeater-tests.ts | 11 +- tests/app/{ => xhr}/xhr-tests.ts | 2 +- .../xml-declaration/xml-declaration-tests.ts | 4 +- .../ui/core/view-base/view-base.ts | 5 + 50 files changed, 258 insertions(+), 120 deletions(-) create mode 100755 tests/app/App_Resources/Android/drawable-nodpi/icon.png rename tests/app/{ => application-settings}/application-settings-tests.ts (99%) rename tests/app/{ => application-settings}/application-settings.md (100%) rename tests/app/{ => application}/application-tests-common.ts (95%) rename tests/app/{ => application}/application-tests.android.ts (98%) create mode 100644 tests/app/application/application-tests.d.ts rename tests/app/{ => application}/application-tests.ios.ts (97%) rename tests/app/{ => application}/application.md (100%) rename tests/app/{ => color}/color-tests.ts (99%) rename tests/app/{ => color}/color.md (100%) rename tests/app/{ => connectivity}/connectivity-tests.ts (100%) rename tests/app/{ => connectivity}/connectivity.md (100%) rename tests/app/{ => console}/console-tests.ts (100%) rename tests/app/{ => console}/console.md (100%) rename tests/app/{ => fetch}/fetch-tests.ts (99%) rename tests/app/{ => fetch}/fetch.md (100%) rename tests/app/{ => file-system}/file-system-tests.ts (99%) rename tests/app/{ => file-system}/file-system.md (100%) rename tests/app/{ => fps-meter}/fps-meter-tests.ts (100%) rename tests/app/{ => fps-meter}/fps-meter.md (100%) rename tests/app/{ => http}/http-string-worker.ts (100%) rename tests/app/{ => http}/http-tests.ts (99%) rename tests/app/{ => http}/http.md (100%) rename tests/app/{ => image-source}/image-source-tests.ts (93%) rename tests/app/{ => image-source}/image-source.md (100%) rename tests/app/{ => platform}/platform-tests.ts (97%) rename tests/app/{ => platform}/platform.md (100%) rename tests/app/{ => timer}/timer-tests.ts (99%) rename tests/app/{ => timer}/timer.md (100%) rename tests/app/{ => trace}/trace-tests.ts (100%) rename tests/app/{ => trace}/trace.md (100%) create mode 100644 tests/app/ui/action-bar/action-bar-tests.d.ts rename tests/app/ui/{ => core/bindable}/bindable-tests.ts (98%) rename tests/app/ui/{ => core/bindable}/binding-expressions-tests.ts (93%) rename tests/app/ui/{ => core/bindable}/bindingContext_testPage.ts (100%) rename tests/app/ui/{ => core/bindable}/bindingContext_testPage.xml (100%) rename tests/app/ui/{ => core/bindable}/bindingContext_testPage1.ts (100%) rename tests/app/ui/{ => core/bindable}/bindingContext_testPage1.xml (100%) rename tests/app/ui/{ => core/bindable}/bindingContext_testPage2.ts (100%) rename tests/app/ui/{ => core/bindable}/bindingContext_testPage2.xml (100%) rename tests/app/{ => ui/core/weak-event-listener}/weak-event-listener-tests.ts (98%) create mode 100644 tests/app/ui/frame/frame-tests.d.ts create mode 100644 tests/app/ui/page/page-tests.d.ts rename tests/app/{ => xhr}/xhr-tests.ts (99%) diff --git a/tests/app/App_Resources/Android/drawable-nodpi/icon.png b/tests/app/App_Resources/Android/drawable-nodpi/icon.png new file mode 100755 index 0000000000000000000000000000000000000000..1034356e2641a785ae5182f97d86293c7d1e572a GIT binary patch literal 10946 zcmb_?2{_d28@4qiB1@EQEFoeRgE5R{2AQ(OP}UlZeVwrkA|<&jHQo*rJR+3k|IEX2qzOb;oPwRqLZUD0Zv2+{Kg9>AAh?H6af4N zad$un{2tV0EnNW01&;$rOG-;vf*@dktehlR8Y%|{p9MfbU@0IN1cb;*fWdI6EF3HY z`2G?gd&65E+syKor-pOp3Qn#+X`Kn*hlxC3KqA%^2$lqW zOX)YDmE}*Is|VikH|JKCK%67a3FquiAY;Klv97i*?k)sdmw%xCdHa7HkcU=F>!**u zjm637rwf9+nkPAp?*sC;XadID6$jMA5nMd*mN+#}a+rcYvLU$Z;rJLhltpZVtPy8%uW>yASRkV_7h0Le;#r7&O! z90Y<($%=!%9sCZ}agp(%nhX*Ifk^$ZRduoS_*VKKwpM@G%Kge#2X9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z4ydVlEPbe~_nalo(BLlbI>bs@JLkc`8CA}VZNnTYYf(m0N+nSFm{o*$(D4oWV{=Q$ zT@8xZA#~40_3?dr>AJ{wP)E@_+4`1(z!t(6PzFB%-vorN8sE+qF@AZ7^*CwMr(YI);q8#PFQ!8H^;ibu}&uA~i7H^|>Q8<&3QPBLlNkVKmi=GY$p@zs~AKU*ChI2>}ol0 z4+%uaQ(T9-b@M%~4Xoyi*VAPQ#;$tbTN_<|cak~|+E!lU=sg_>S0v-_sIc86HicLi z?zAW>b<8}Br(AsXvT}f8A#mv7Rzn;a4>KQD^H@v)vsp*Oa$5N426;

zvdWFzyssG8u}~0Va`pM>Hw-)f z@eQ@k(6+8OW@%NkBt_aHG{7U`T8@%&!q2Pr#wW#2+zDW)X`z_?O&y6HEq>W> color-hex diff --git a/tests/app/color.md b/tests/app/color/color.md similarity index 100% rename from tests/app/color.md rename to tests/app/color/color.md diff --git a/tests/app/connectivity-tests.ts b/tests/app/connectivity/connectivity-tests.ts similarity index 100% rename from tests/app/connectivity-tests.ts rename to tests/app/connectivity/connectivity-tests.ts diff --git a/tests/app/connectivity.md b/tests/app/connectivity/connectivity.md similarity index 100% rename from tests/app/connectivity.md rename to tests/app/connectivity/connectivity.md diff --git a/tests/app/console-tests.ts b/tests/app/console/console-tests.ts similarity index 100% rename from tests/app/console-tests.ts rename to tests/app/console/console-tests.ts diff --git a/tests/app/console.md b/tests/app/console/console.md similarity index 100% rename from tests/app/console.md rename to tests/app/console/console.md diff --git a/tests/app/fetch-tests.ts b/tests/app/fetch/fetch-tests.ts similarity index 99% rename from tests/app/fetch-tests.ts rename to tests/app/fetch/fetch-tests.ts index 5e40cae37..9b9e6edc1 100644 --- a/tests/app/fetch-tests.ts +++ b/tests/app/fetch/fetch-tests.ts @@ -1,5 +1,5 @@ /* tslint:disable:no-unused-variable */ -import * as TKUnit from "./TKUnit"; +import * as TKUnit from "../TKUnit"; import * as types from "tns-core-modules/utils/types"; export var test_fetch_defined = function () { diff --git a/tests/app/fetch.md b/tests/app/fetch/fetch.md similarity index 100% rename from tests/app/fetch.md rename to tests/app/fetch/fetch.md diff --git a/tests/app/file-system-tests.ts b/tests/app/file-system/file-system-tests.ts similarity index 99% rename from tests/app/file-system-tests.ts rename to tests/app/file-system/file-system-tests.ts index 313513839..53a66f9e4 100644 --- a/tests/app/file-system-tests.ts +++ b/tests/app/file-system/file-system-tests.ts @@ -3,7 +3,7 @@ import * as fs from "tns-core-modules/file-system"; // << file-system-require -import * as TKUnit from "./TKUnit"; +import * as TKUnit from "../TKUnit"; import * as appModule from "tns-core-modules/application"; import * as platform from "tns-core-modules/platform"; diff --git a/tests/app/file-system.md b/tests/app/file-system/file-system.md similarity index 100% rename from tests/app/file-system.md rename to tests/app/file-system/file-system.md diff --git a/tests/app/fps-meter-tests.ts b/tests/app/fps-meter/fps-meter-tests.ts similarity index 100% rename from tests/app/fps-meter-tests.ts rename to tests/app/fps-meter/fps-meter-tests.ts diff --git a/tests/app/fps-meter.md b/tests/app/fps-meter/fps-meter.md similarity index 100% rename from tests/app/fps-meter.md rename to tests/app/fps-meter/fps-meter.md diff --git a/tests/app/http-string-worker.ts b/tests/app/http/http-string-worker.ts similarity index 100% rename from tests/app/http-string-worker.ts rename to tests/app/http/http-string-worker.ts diff --git a/tests/app/http-tests.ts b/tests/app/http/http-tests.ts similarity index 99% rename from tests/app/http-tests.ts rename to tests/app/http/http-tests.ts index f5a606d6a..e1f01037f 100644 --- a/tests/app/http-tests.ts +++ b/tests/app/http/http-tests.ts @@ -1,5 +1,5 @@ /* tslint:disable:no-unused-variable */ -import * as TKUnit from "./TKUnit"; +import * as TKUnit from "../TKUnit"; import * as http from "tns-core-modules/http"; import * as types from "tns-core-modules/utils/types"; import * as fs from "tns-core-modules/file-system"; diff --git a/tests/app/http.md b/tests/app/http/http.md similarity index 100% rename from tests/app/http.md rename to tests/app/http/http.md diff --git a/tests/app/image-source-tests.ts b/tests/app/image-source/image-source-tests.ts similarity index 93% rename from tests/app/image-source-tests.ts rename to tests/app/image-source/image-source-tests.ts index 8c616011c..448883fc6 100644 --- a/tests/app/image-source-tests.ts +++ b/tests/app/image-source/image-source-tests.ts @@ -9,20 +9,17 @@ import * as imageSource from "tns-core-modules/image-source"; import * as fs from "tns-core-modules/file-system"; import * as app from "tns-core-modules/application"; -import * as TKUnit from "./TKUnit"; +import * as TKUnit from "../TKUnit"; import * as platform from "tns-core-modules/platform"; -var imagePath = fs.path.join(__dirname, "/logo.png"); -var smallImagePath = fs.path.join(__dirname, "/small-image.png"); +var imagePath = "~/logo.png"; +var smallImagePath = "~/small-image.png"; -/* TODO: We need a way to programmatically add an image to resources and then load it from, otherwise we do not know if there is such resource in the target native app. export function testFromResource() { - // >> imagesource-resname - var img = imageSource.fromResource("logo"); - // << imagesource-resname + var img = imageSource.fromResource("icon"); TKUnit.assert(img.height > 0, "image.fromResource failed"); } -*/ + export function testFromUrl(done) { //var completed; var result: imageSource.ImageSource; diff --git a/tests/app/image-source.md b/tests/app/image-source/image-source.md similarity index 100% rename from tests/app/image-source.md rename to tests/app/image-source/image-source.md diff --git a/tests/app/platform-tests.ts b/tests/app/platform/platform-tests.ts similarity index 97% rename from tests/app/platform-tests.ts rename to tests/app/platform/platform-tests.ts index 7a7ac3d06..81de067d5 100644 --- a/tests/app/platform-tests.ts +++ b/tests/app/platform/platform-tests.ts @@ -1,4 +1,4 @@ -import * as TKUnit from "./TKUnit"; +import * as TKUnit from "../TKUnit"; import * as app from "tns-core-modules/application"; import { isIOS, isAndroid } from "tns-core-modules/platform"; diff --git a/tests/app/platform.md b/tests/app/platform/platform.md similarity index 100% rename from tests/app/platform.md rename to tests/app/platform/platform.md diff --git a/tests/app/testRunner.ts b/tests/app/testRunner.ts index fe8ffcdd5..9912756cd 100644 --- a/tests/app/testRunner.ts +++ b/tests/app/testRunner.ts @@ -8,6 +8,8 @@ import { StackLayout } from "tns-core-modules/ui/layouts/stack-layout"; import * as platform from "tns-core-modules/platform"; import "./ui-test"; import * as fs from "tns-core-modules/file-system"; +import { unsetValue } from "tns-core-modules/ui/core/properties"; +import { ad } from "tns-core-modules/utils/utils"; Frame.defaultAnimatedNavigation = false; @@ -29,80 +31,206 @@ export function isRunningOnEmulator(): boolean { export var allTests = {}; -allTests["PLATFORM"] = require("./platform-tests"); -allTests["FILE SYSTEM"] = require("./file-system-tests"); -allTests["HTTP"] = require("./http-tests"); -allTests["XHR"] = require("./xhr-tests"); -allTests["FETCH"] = require("./fetch-tests"); -allTests["APPLICATION SETTINGS"] = require("./application-settings-tests"); -allTests["APPLICATION"] = require("./application-tests"); -allTests["IMAGE SOURCE"] = require("./image-source-tests"); -allTests["OBSERVABLE-ARRAY"] = require("./data/observable-array-tests"); -allTests["VIRTUAL-ARRAY"] = require("./data/virtual-array-tests"); -allTests["OBSERVABLE"] = require("./data/observable-tests"); -allTests["TIMER"] = require("./timer-tests"); -allTests["COLOR"] = require("./color-tests"); +import * as platformTests from "./platform/platform-tests"; +allTests["PLATFORM"] = platformTests; -// allTests["DEPENDENCY-OBSERVABLE"] = require("./ui/dependency-observable-tests"); -allTests["BINDABLE"] = require("./ui/bindable-tests"); -allTests["BINDING-EXPRESSIONS"] = require("./ui/binding-expressions-tests"); -allTests["XML-PARSER"] = require("./xml-parser-tests/xml-parser-tests"); -allTests["FORMATTEDSTRING"] = require("./text/formatted-string-tests"); -allTests["FILE-SYSTEM-ACCESS"] = require("./file-system-access-tests/file-system-access-tests"); -allTests["FILE-NAME-RESOLVER"] = require("./file-name-resolver-tests/file-name-resolver-tests"); -allTests["WEAK-EVENTS"] = require("./weak-event-listener-tests"); -allTests["CONNECTIVITY"] = require("./connectivity-tests"); +import * as fsTests from "./file-system/file-system-tests"; +allTests["FILE SYSTEM"] = fsTests; -allTests["PROXY-VIEW-CONTAINER"] = require("./ui/proxy-view-container/proxy-view-container-tests") -allTests["SCROLL-VIEW"] = require("./ui/scroll-view/scroll-view-tests"); -allTests["ACTION-BAR"] = require("./ui/action-bar/action-bar-tests"); -allTests["XML-DECLARATION"] = require("./xml-declaration/xml-declaration-tests"); -allTests["DOCKLAYOUT"] = require("./ui/layouts/dock-layout-tests"); -allTests["WRAPLAYOUT"] = require("./ui/layouts/wrap-layout-tests"); -allTests["ABSOLUTELAYOUT"] = require("./ui/layouts/absolute-layout-tests"); -allTests["GRIDLAYOUT"] = require("./ui/layouts/grid-layout-tests"); -allTests["STACKLAYOUT"] = require("./ui/layouts/stack-layout-tests"); -allTests["FLEXBOXLAYOUT"] = require("./ui/layouts/flexbox-layout-tests"); -allTests["STYLE-PROPERTIES"] = require("./ui/styling/style-properties-tests"); -allTests["FRAME"] = require("./ui/frame/frame-tests"); -allTests["VIEW"] = require("./ui/view/view-tests"); -allTests["STYLE"] = require("./ui/styling/style-tests"); -allTests["VISUAL-STATE"] = require("./ui/styling/visual-state-tests"); -allTests["VALUE-SOURCE"] = require("./ui/styling/value-source-tests"); -allTests["CSS-SELECTOR-PARSER"] = require("./ui/styling/css-selector-parser"); -allTests["CSS-SELECTOR"] = require("./ui/styling/css-selector"); -allTests["BUTTON"] = require("./ui/button/button-tests"); -allTests["BORDER"] = require("./ui/border/border-tests"); -allTests["LABEL"] = require("./ui/label/label-tests"); -allTests["TAB-VIEW"] = require("./ui/tab-view/tab-view-tests"); -allTests["TAB-VIEW-NAVIGATION"] = require("./ui/tab-view/tab-view-navigation-tests"); -allTests["IMAGE"] = require("./ui/image/image-tests"); -allTests["SLIDER"] = require("./ui/slider/slider-tests"); -allTests["SWITCH"] = require("./ui/switch/switch-tests"); -allTests["PROGRESS"] = require("./ui/progress/progress-tests"); -allTests["PLACEHOLDER"] = require("./ui/placeholder/placeholder-tests"); -allTests["PAGE"] = require("./ui/page/page-tests"); -allTests["LISTVIEW"] = require("./ui/list-view/list-view-tests"); -allTests["ACTIVITY-INDICATOR"] = require("./ui/activity-indicator/activity-indicator-tests"); -allTests["TEXT-FIELD"] = require("./ui/text-field/text-field-tests"); -allTests["TEXT-VIEW"] = require("./ui/text-view/text-view-tests"); -allTests["LIST-PICKER"] = require("./ui/list-picker/list-picker-tests"); -allTests["DATE-PICKER"] = require("./ui/date-picker/date-picker-tests"); -allTests["TIME-PICKER"] = require("./ui/time-picker/time-picker-tests"); -allTests["WEB-VIEW"] = require("./ui/web-view/web-view-tests"); -allTests["HTML-VIEW"] = require("./ui/html-view/html-view-tests"); -allTests["REPEATER"] = require("./ui/repeater/repeater-tests"); -allTests["SEARCH-BAR"] = require('./ui/search-bar/search-bar-tests'); -allTests["SEGMENTED-BAR"] = require("./ui/segmented-bar/segmented-bar-tests"); -allTests["ANIMATION"] = require("./ui/animation/animation-tests"); -allTests["CSS-ANIMATION"] = require("./ui/animation/css-animation-tests"); +import * as httpTests from "./http/http-tests"; +allTests["HTTP"] = httpTests; +import * as xhrTests from "./xhr/xhr-tests"; +allTests["XHR"] = xhrTests; + +import * as fetchTests from "./fetch/fetch-tests"; +allTests["FETCH"] = fetchTests; + +import * as appSettingsTests from "./application-settings/application-settings-tests"; +allTests["APPLICATION SETTINGS"] = appSettingsTests; + +import * as applicationTests from "./application/application-tests"; +allTests["APPLICATION"] = applicationTests; + +import * as imageSourceTests from "./image-source/image-source-tests"; +allTests["IMAGE SOURCE"] = imageSourceTests; + +import * as observableArrayTests from "./data/observable-array-tests"; +allTests["OBSERVABLE-ARRAY"] = observableArrayTests; + +import * as virtualArrayTests from "./data/virtual-array-tests"; +allTests["VIRTUAL-ARRAY"] = virtualArrayTests; + +import * as observableTests from "./data/observable-tests"; +allTests["OBSERVABLE"] = observableTests; + +import * as timerTests from "./timer/timer-tests"; +allTests["TIMER"] = timerTests; + +import * as colorTests from "./color/color-tests"; +allTests["COLOR"] = colorTests; + +import * as bindableTests from "./ui/core/bindable/bindable-tests"; +allTests["BINDABLE"] = bindableTests; + +import * as bindintExpressionTests from "./ui/core/bindable/binding-expressions-tests"; +allTests["BINDING-EXPRESSIONS"] = bindintExpressionTests; + +import * as xmlParserTests from "./xml-parser-tests/xml-parser-tests"; +allTests["XML-PARSER"] = xmlParserTests; + +import * as formattedStringTests from "./text/formatted-string-tests"; +allTests["FORMATTEDSTRING"] = formattedStringTests; + +import * as fileSystemAccessTests from "./file-system-access-tests/file-system-access-tests"; +allTests["FILE-SYSTEM-ACCESS"] = fileSystemAccessTests; + +import * as fileNameResolverTests from "./file-name-resolver-tests/file-name-resolver-tests"; +allTests["FILE-NAME-RESOLVER"] = fileNameResolverTests; + +import * as weakEventsTests from "./ui/core/weak-event-listener/weak-event-listener-tests"; +allTests["WEAK-EVENTS"] = weakEventsTests; + +import * as connectivityTests from "./connectivity/connectivity-tests"; +allTests["CONNECTIVITY"] = connectivityTests; + +import * as proxyViewContainerTests from "./ui/proxy-view-container/proxy-view-container-tests"; +allTests["PROXY-VIEW-CONTAINER"] = proxyViewContainerTests; + +import * as scrollViewTests from "./ui/scroll-view/scroll-view-tests"; +allTests["SCROLL-VIEW"] = scrollViewTests; + +import * as actionBarTests from "./ui/action-bar/action-bar-tests"; +allTests["ACTION-BAR"] = actionBarTests; + +import * as xmlDeclarationTests from "./xml-declaration/xml-declaration-tests"; +allTests["XML-DECLARATION"] = xmlDeclarationTests; + +import * as dockLayoutTests from "./ui/layouts/dock-layout-tests"; +allTests["DOCKLAYOUT"] = dockLayoutTests; + +import * as wrapLayoutTests from "./ui/layouts/wrap-layout-tests"; +allTests["WRAPLAYOUT"] = wrapLayoutTests; + +import * as absoluteLayoutTests from "./ui/layouts/absolute-layout-tests"; +allTests["ABSOLUTELAYOUT"] = absoluteLayoutTests; + +import * as gridLayoutTests from "./ui/layouts/grid-layout-tests"; +allTests["GRIDLAYOUT"] = gridLayoutTests; + +import * as stackLayoutTests from "./ui/layouts/stack-layout-tests"; +allTests["STACKLAYOUT"] = stackLayoutTests; + +import * as flexBoxLayoutTests from "./ui/layouts/flexbox-layout-tests"; +allTests["FLEXBOXLAYOUT"] = flexBoxLayoutTests; + +import * as stylePropertiesTests from "./ui/styling/style-properties-tests"; +allTests["STYLE-PROPERTIES"] = stylePropertiesTests; + +import * as frameTests from "./ui/frame/frame-tests"; +allTests["FRAME"] = frameTests; + +import * as viewTests from "./ui/view/view-tests"; +allTests["VIEW"] = viewTests; + +import * as styleTests from "./ui/styling/style-tests"; +allTests["STYLE"] = styleTests; + +import * as visualStateTests from "./ui/styling/visual-state-tests"; +allTests["VISUAL-STATE"] = visualStateTests; + +import * as valueSourceTests from "./ui/styling/value-source-tests"; +allTests["VALUE-SOURCE"] = valueSourceTests; + +import * as cssSelectorParserTests from "./ui/styling/css-selector-parser"; +allTests["CSS-SELECTOR-PARSER"] = cssSelectorParserTests; + +import * as cssSelectorTests from "./ui/styling/css-selector"; +allTests["CSS-SELECTOR"] = cssSelectorTests; + +import * as buttonTests from "./ui/button/button-tests"; +allTests["BUTTON"] = buttonTests; + +import * as borderTests from "./ui/border/border-tests"; +allTests["BORDER"] = borderTests; + +import * as labelTests from "./ui/label/label-tests"; +allTests["LABEL"] = labelTests; + +import * as tabViewTests from "./ui/tab-view/tab-view-tests"; +allTests["TAB-VIEW"] = tabViewTests; + +import * as tabViewNavigationTests from "./ui/tab-view/tab-view-navigation-tests"; +allTests["TAB-VIEW-NAVIGATION"] = tabViewNavigationTests; + +import * as imageTests from "./ui/image/image-tests"; +allTests["IMAGE"] = imageTests; + +import * as sliderTests from "./ui/slider/slider-tests"; +allTests["SLIDER"] = sliderTests; + +import * as switchTests from "./ui/switch/switch-tests"; +allTests["SWITCH"] = switchTests; + +import * as progressTests from "./ui/progress/progress-tests"; +allTests["PROGRESS"] = progressTests; + +import * as placeholderTests from "./ui/placeholder/placeholder-tests"; +allTests["PLACEHOLDER"] = placeholderTests; + +import * as pageTests from "./ui/page/page-tests"; +allTests["PAGE"] = pageTests; + +import * as listViewTests from "./ui/list-view/list-view-tests"; +allTests["LISTVIEW"] = listViewTests; + +import * as activityIndicatorTests from "./ui/activity-indicator/activity-indicator-tests"; +allTests["ACTIVITY-INDICATOR"] = activityIndicatorTests; + +import * as textFieldTests from "./ui/text-field/text-field-tests"; +allTests["TEXT-FIELD"] = textFieldTests; + +import * as textViewTests from "./ui/text-view/text-view-tests"; +allTests["TEXT-VIEW"] = textViewTests; + +import * as listPickerTests from "./ui/list-picker/list-picker-tests"; +allTests["LIST-PICKER"] = listPickerTests; + +import * as datePickerTests from "./ui/date-picker/date-picker-tests"; +allTests["DATE-PICKER"] = datePickerTests; + +import * as timePickerTests from "./ui/time-picker/time-picker-tests"; +allTests["TIME-PICKER"] = timePickerTests; + +import * as webViewTests from "./ui/web-view/web-view-tests"; +allTests["WEB-VIEW"] = webViewTests; + +import * as htmlViewTests from "./ui/html-view/html-view-tests"; +allTests["HTML-VIEW"] = htmlViewTests; + +import * as repeaterTests from "./ui/repeater/repeater-tests"; +allTests["REPEATER"] = repeaterTests; + +import * as searchBarTests from "./ui/search-bar/search-bar-tests"; +allTests["SEARCH-BAR"] = searchBarTests; + +import * as segmentedBarTests from "./ui/segmented-bar/segmented-bar-tests"; +allTests["SEGMENTED-BAR"] = segmentedBarTests; + +import * as animationTests from "./ui/animation/animation-tests"; +allTests["ANIMATION"] = animationTests; + +import * as cssAnimationTests from "./ui/animation/css-animation-tests"; +allTests["CSS-ANIMATION"] = cssAnimationTests; + +import * as transitionTests from "./navigation/transition-tests"; // Skip transitions on android emulators with API 23 if (!(platform.device.os === platform.platformNames.android && parseInt(platform.device.sdkVersion) === 23 && isRunningOnEmulator())) { - allTests["TANSITIONS"] = require("./navigation/transition-tests"); + allTests["TANSITIONS"] = transitionTests; } -allTests["NAVIGATION"] = require("./navigation/navigation-tests"); +import * as navigationTests from "./navigation/navigation-tests"; +allTests["NAVIGATION"] = navigationTests; var testsWithLongDelay = { test_Transitions: 3 * 60 * 1000, @@ -208,7 +336,17 @@ function printRunTestStats() { messageContainer.editable = messageContainer.autocorrect = false; messageContainer.text = finalMessage; stack.addChild(messageContainer); - topmost().currentPage.content = stack; + const page = topmost().currentPage; + page.id = unsetValue; + page.className = unsetValue; + page.bindingContext = unsetValue; + page.style.color = unsetValue; + page.style.backgroundColor = unsetValue; + page.content = stack; + messageContainer.focus(); + if (page.android) { + setTimeout(() => messageContainer.dismissSoftInput()); + } } function startLog(): void { diff --git a/tests/app/timer-tests.ts b/tests/app/timer/timer-tests.ts similarity index 99% rename from tests/app/timer-tests.ts rename to tests/app/timer/timer-tests.ts index 08eac111d..57a48e560 100644 --- a/tests/app/timer-tests.ts +++ b/tests/app/timer/timer-tests.ts @@ -1,4 +1,4 @@ -import * as TKUnit from "./TKUnit"; +import * as TKUnit from "../TKUnit"; import * as timer from "tns-core-modules/timer"; // >> timer-require diff --git a/tests/app/timer.md b/tests/app/timer/timer.md similarity index 100% rename from tests/app/timer.md rename to tests/app/timer/timer.md diff --git a/tests/app/trace-tests.ts b/tests/app/trace/trace-tests.ts similarity index 100% rename from tests/app/trace-tests.ts rename to tests/app/trace/trace-tests.ts diff --git a/tests/app/trace.md b/tests/app/trace/trace.md similarity index 100% rename from tests/app/trace.md rename to tests/app/trace/trace.md diff --git a/tests/app/ui/action-bar/action-bar-tests-common.ts b/tests/app/ui/action-bar/action-bar-tests-common.ts index 1cbbbae1c..0c5133d35 100644 --- a/tests/app/ui/action-bar/action-bar-tests-common.ts +++ b/tests/app/ui/action-bar/action-bar-tests-common.ts @@ -1,7 +1,6 @@ import * as TKUnit from "../../TKUnit"; import * as helper from "../helper"; import * as builder from "tns-core-modules/ui/builder"; -import * as fs from "tns-core-modules/file-system"; import { Label } from "tns-core-modules/ui/label"; import { Button } from "tns-core-modules/ui/button"; import { Page } from "tns-core-modules/ui/page"; @@ -212,10 +211,8 @@ export function test_Setting_ActionItemsWithNumberAsText_doesnt_thrown() { let gotException = false; - const moduleName = __dirname.substr(fs.knownFolders.currentApp().path.length); - try { - helper.navigateToModule(moduleName + "/ActionBar_NumberAsText"); + helper.navigateToModule("ui/action-bar/ActionBar_NumberAsText"); } catch (e) { gotException = true; @@ -225,8 +222,8 @@ export function test_Setting_ActionItemsWithNumberAsText_doesnt_thrown() { } export function test_CanDefineEverythingAsContentBetweenTheTwoTags() { - const moduleName = __dirname.substr(fs.knownFolders.currentApp().path.length); - helper.navigateToModuleAndRunTest(moduleName + "/ActionBar_BetweenTags", undefined, (page: Page) => { + + helper.navigateToModuleAndRunTest("ui/action-bar/ActionBar_BetweenTags", undefined, (page: Page) => { TKUnit.assertNotNull(page.actionBar.navigationButton); TKUnit.assertEqual(page.actionBar.navigationButton.text, "nb"); diff --git a/tests/app/ui/action-bar/action-bar-tests.d.ts b/tests/app/ui/action-bar/action-bar-tests.d.ts new file mode 100644 index 000000000..03c7bb7c5 --- /dev/null +++ b/tests/app/ui/action-bar/action-bar-tests.d.ts @@ -0,0 +1,3 @@ +/* tslint:disable */ +import * as android from "./action-bar-tests.android"; +import * as iOS from "./action-bar-tests.ios"; \ No newline at end of file diff --git a/tests/app/ui/border/border-tests.ts b/tests/app/ui/border/border-tests.ts index 0548aee33..1425ebd4f 100644 --- a/tests/app/ui/border/border-tests.ts +++ b/tests/app/ui/border/border-tests.ts @@ -1,4 +1,5 @@ // >> border-require -var borderModule = require("ui/border"); +import { Border } from "tns-core-modules/ui/border"; // << border-require -console.dir(borderModule); + +console.dir(Border); \ No newline at end of file diff --git a/tests/app/ui/bindable-tests.ts b/tests/app/ui/core/bindable/bindable-tests.ts similarity index 98% rename from tests/app/ui/bindable-tests.ts rename to tests/app/ui/core/bindable/bindable-tests.ts index d9a03ae9d..7ebb0285e 100644 --- a/tests/app/ui/bindable-tests.ts +++ b/tests/app/ui/core/bindable/bindable-tests.ts @@ -1,12 +1,11 @@ import { Observable, fromObject, fromObjectRecursive } from "tns-core-modules/data/observable"; import { ViewBase } from "tns-core-modules/ui/core/view-base"; import { BindingOptions } from "tns-core-modules/ui/core/bindable"; -import * as TKUnit from "../TKUnit"; +import * as TKUnit from "../../../TKUnit"; import * as types from "tns-core-modules/utils/types"; -import * as helper from "../ui/helper"; +import * as helper from "../../helper"; import * as utils from "tns-core-modules/utils/utils"; import * as bindingBuilder from "tns-core-modules/ui/builder/binding-builder"; -import * as fs from "tns-core-modules/file-system"; import * as appModule from "tns-core-modules/application"; import * as trace from "tns-core-modules/trace"; import { View } from "tns-core-modules/ui/core/view"; @@ -502,24 +501,22 @@ export function test_TwoElementsBindingToSameBindingContext() { TKUnit.assertEqual(upperStackLabel.text, label1.text, "label1"); TKUnit.assertEqual(upperStackLabel.text, label2.text, "label2"); }; - const moduleName = __dirname.substr(fs.knownFolders.currentApp().path.length); - helper.navigateToModuleAndRunTest(("." + moduleName + "/bindingContext_testPage"), null, testFunc); + helper.navigateToModuleAndRunTest(("ui/core/bindable/bindingContext_testPage"), null, testFunc); }; 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; }; - helper.navigateToModuleAndRunTest(("." + moduleName + "/bindingContext_testPage2"), page.bindingContext, innerTestFunc); + helper.navigateToModuleAndRunTest(("ui/core/bindable/bindingContext_testPage2"), page.bindingContext, innerTestFunc); const testLabel: Label =