diff --git a/tests/.vscode/launch.json b/tests/.vscode/launch.json index f335d2443..4de4a4a31 100644 --- a/tests/.vscode/launch.json +++ b/tests/.vscode/launch.json @@ -43,7 +43,8 @@ "sourceMaps": true, "diagnosticLogging": false, "emulator": false, - "rebuild": false + "rebuild": false, + "stopOnEntry": true }, { "name": "Launch on Android", diff --git a/tests/app/testRunner.ts b/tests/app/testRunner.ts index 1d1f877b3..ede2c8fe7 100644 --- a/tests/app/testRunner.ts +++ b/tests/app/testRunner.ts @@ -55,7 +55,7 @@ allTests["CONNECTIVITY"] = require("./connectivity-tests"); // 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["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"); 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 c883fad9c..132d78854 100644 --- a/tests/app/ui/action-bar/action-bar-tests-common.ts +++ b/tests/app/ui/action-bar/action-bar-tests-common.ts @@ -1,11 +1,11 @@ import * as TKUnit from "../../TKUnit"; -import * as LabelModule from "ui/label"; import * as helper from "../helper"; import * as builder from "ui/builder"; -import * as button from "ui/button"; -import * as PageModule from "ui/page"; -import * as viewModule from "ui/core/view"; import * as fs from "file-system"; +import { Label } from "ui/label"; +import { Button } from "ui/button"; +import { Page } from "ui/page"; +import { View } from "ui/core/view"; import { Observable } from "data/observable"; // >> actionbar-common-require @@ -13,14 +13,14 @@ import * as actionBarModule from "ui/action-bar"; // << actionbar-common-require export function test_actionItem_inherit_bindingContext() { - var page: PageModule.Page; - var label: LabelModule.Label; - var context = { text: "item" }; + let page: Page; + let label: Label; + const context = { text: "item" }; - var pageFactory = function (): PageModule.Page { - page = new PageModule.Page(); + const pageFactory = function (): Page { + page = new Page(); page.bindingContext = context; - var actionItem = new actionBarModule.ActionItem(); + const actionItem = new actionBarModule.ActionItem(); actionItem.bind({ sourceProperty: "text", @@ -29,7 +29,7 @@ export function test_actionItem_inherit_bindingContext() { page.actionBar.actionItems.addItem(actionItem); - label = new LabelModule.Label(); + label = new Label(); label.text = "Text"; page.content = label; return page; @@ -41,7 +41,7 @@ export function test_actionItem_inherit_bindingContext() { } export function test_actionBar_inherit_bindingContext_inXML() { - var p = builder.parse( + const p = builder.parse( " "); p.bindingContext = { myProp: "success" }; @@ -49,52 +49,52 @@ export function test_actionBar_inherit_bindingContext_inXML() { }; export function test_actionItem_inherit_bindingContext_inXML() { - var p = builder.parse( + const p = builder.parse( " " + "" + " "); p.bindingContext = { myProp: "success" }; - var actionItem = p.actionBar.actionItems.getItemAt(0); + const actionItem = p.actionBar.actionItems.getItemAt(0); TKUnit.assertEqual(actionItem.text, "success", "actionItem.text"); }; export function test_actionItem_page_property_inXML() { - var p = builder.parse( + const p = builder.parse( " " + "" + " "); - var actionItem = p.actionBar.actionItems.getItemAt(0); + const actionItem = p.actionBar.actionItems.getItemAt(0); TKUnit.assertEqual(actionItem.page, p, "actionItem.page"); }; export function test_actionItem_actionView_inXML() { - var p = builder.parse( + const p = builder.parse( " " + " "); - var label = p.actionBar.actionItems.getItemAt(0).actionView; - TKUnit.assert(label instanceof LabelModule.Label, "ActionItem.actionView not loaded correctly"); + const label =