From 68906152b900462a0016e12ac1e25f98b3adcebc Mon Sep 17 00:00:00 2001 From: vakrilov Date: Thu, 3 Dec 2015 13:58:51 +0200 Subject: [PATCH] Test - action bar is not empty when there is titleView --- .../ui/action-bar/action-bar-tests-common.ts | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/apps/tests/ui/action-bar/action-bar-tests-common.ts b/apps/tests/ui/action-bar/action-bar-tests-common.ts index 164e4b931..81d5eac6d 100644 --- a/apps/tests/ui/action-bar/action-bar-tests-common.ts +++ b/apps/tests/ui/action-bar/action-bar-tests-common.ts @@ -19,12 +19,12 @@ import actionBarModule = require("ui/action-bar"); //```XML // // -// {%raw%}{%endraw%} +// {%raw%}{%endraw%} // // ... // //``` -//The icon can only be set in Android platform. Following the design guides it is automatically hidden in Lollipop versions (API level >= 20). You explicitly control its visibility with the `android.iconVisibility' property. +//The icon can only be set in Android platform. It is hidden by default, but you explicitly control its visibility with the `android.iconVisibility' property. // // // ## Setting Custom Title View @@ -205,7 +205,7 @@ export function test_titleView_inherit_bindingContext_inXML() { p.bindingContext = { myProp: "success" }; var centerBtn = p.actionBar.titleView; - TKUnit.assert(centerBtn instanceof button.Button, "cneterView not loaded correctly"); + TKUnit.assert(centerBtn instanceof button.Button, "titleView not loaded correctly"); TKUnit.assertEqual(centerBtn.text, "success", "actionItem.text"); }; @@ -216,7 +216,7 @@ export function test_titleView_inXML() { " "); var centerBtn = p.actionBar.titleView; - TKUnit.assert(centerBtn instanceof button.Button, "cneterView not loaded correctly"); + TKUnit.assert(centerBtn instanceof button.Button, "titleView not loaded correctly"); }; export function test_titleView_inXML_short_definition() { @@ -226,7 +226,16 @@ export function test_titleView_inXML_short_definition() { " "); var centerBtn = p.actionBar.titleView; - TKUnit.assert(centerBtn instanceof button.Button, "cneterView not loaded correctly"); + TKUnit.assert(centerBtn instanceof button.Button, "titleView not loaded correctly"); +}; + +export function test_ActionBar_is_not_empty_when_titleView_is_set() { + var p = builder.parse( + " " + + "