From 202a7112fca683e9065c99814269228161bea6e3 Mon Sep 17 00:00:00 2001 From: Vasil Chimev Date: Wed, 13 Jan 2016 15:14:29 +0200 Subject: [PATCH] Update ui-tests-app --- CrossPlatformModules.csproj | 4 + .../decoration-transform-formattedtext.xml | 38 ++++++++-- apps/ui-tests-app/css/text-decoration.ts | 33 ++++++-- apps/ui-tests-app/css/text-decoration.xml | 55 +++++++------- apps/ui-tests-app/css/text-transform.ts | 45 +++++++++-- apps/ui-tests-app/css/text-transform.xml | 75 +++++++------------ apps/ui-tests-app/css/white-space.ts | 16 +++- apps/ui-tests-app/css/white-space.xml | 9 ++- apps/ui-tests-app/mainPage.ts | 18 ++--- 9 files changed, 190 insertions(+), 103 deletions(-) diff --git a/CrossPlatformModules.csproj b/CrossPlatformModules.csproj index a06447a17..9dd48b89d 100644 --- a/CrossPlatformModules.csproj +++ b/CrossPlatformModules.csproj @@ -205,6 +205,9 @@ Designer + + + Designer @@ -276,6 +279,7 @@ color.xml + html-view.xml diff --git a/apps/ui-tests-app/css/decoration-transform-formattedtext.xml b/apps/ui-tests-app/css/decoration-transform-formattedtext.xml index 4be69385d..d8eb2c6bf 100644 --- a/apps/ui-tests-app/css/decoration-transform-formattedtext.xml +++ b/apps/ui-tests-app/css/decoration-transform-formattedtext.xml @@ -1,27 +1,53 @@  - \ No newline at end of file diff --git a/apps/ui-tests-app/css/text-decoration.ts b/apps/ui-tests-app/css/text-decoration.ts index 1697df70c..737f4c465 100644 --- a/apps/ui-tests-app/css/text-decoration.ts +++ b/apps/ui-tests-app/css/text-decoration.ts @@ -1,18 +1,41 @@ import view = require("ui/core/view"); import observable = require("data/observable"); import label = require("ui/label"); +import button = require("ui/button"); +import textField = require("ui/text-field"); +import textView = require("ui/text-view"); export function butonTap(args) { - var btn = args.object; - var lbl = btn.parent.getViewById("Label1"); + var btnChange = args.object; + var lbl = btnChange.parent.getViewById("Label"); + var btn = btnChange.parent.getViewById("Button"); + var textField = btnChange.parent.getViewById("TextField"); + var textView = btnChange.parent.getViewById("TextView"); - if (lbl.style.textDecoration === "underline") { + if (lbl.style.textDecoration === "none") { + lbl.style.textDecoration = "underline"; + btn.style.textDecoration = "underline"; + textField.style.textDecoration = "underline"; + textView.style.textDecoration = "underline"; + } else if (lbl.style.textDecoration === "underline") { lbl.style.textDecoration = "line-through"; + btn.style.textDecoration = "line-through"; + textField.style.textDecoration = "line-through"; + textView.style.textDecoration = "line-through"; } else if (lbl.style.textDecoration === "line-through") { lbl.style.textDecoration = "line-through underline"; + btn.style.textDecoration = "line-through underline"; + textField.style.textDecoration = "line-through underline"; + textView.style.textDecoration = "line-through underline"; } else if (lbl.style.textDecoration === "line-through underline") { + lbl.style.textDecoration = "line-through underline none"; + btn.style.textDecoration = "line-through underline none"; + textField.style.textDecoration = "line-through underline none"; + textView.style.textDecoration = "line-through underline none"; + } else if (lbl.style.textDecoration === "line-through underline none") { lbl.style.textDecoration = "none"; - } else if (lbl.style.textDecoration === "none") { - lbl.style.textDecoration = "underline"; + btn.style.textDecoration = "none"; + textField.style.textDecoration = "none"; + textView.style.textDecoration = "none"; } } \ No newline at end of file diff --git a/apps/ui-tests-app/css/text-decoration.xml b/apps/ui-tests-app/css/text-decoration.xml index 4e71c619b..f4b50cc9e 100644 --- a/apps/ui-tests-app/css/text-decoration.xml +++ b/apps/ui-tests-app/css/text-decoration.xml @@ -1,32 +1,35 @@  - - - - - - + \ No newline at end of file diff --git a/apps/ui-tests-app/css/white-space.ts b/apps/ui-tests-app/css/white-space.ts index d1f3a85c1..56b230dde 100644 --- a/apps/ui-tests-app/css/white-space.ts +++ b/apps/ui-tests-app/css/white-space.ts @@ -1,14 +1,26 @@ import view = require("ui/core/view"); import observable = require("data/observable"); import label = require("ui/label"); +import button = require("ui/button"); +import textField = require("ui/text-field"); +import textView = require("ui/text-view"); export function butonTap(args: observable.EventData) { - var btn = args.object; - var lbl = btn.parent.getViewById("Label1"); + var btnChange = args.object; + var lbl = btnChange.parent.getViewById("Label"); + var btn = btnChange.parent.getViewById("Button"); + var textField = btnChange.parent.getViewById("TextField"); + var textView = btnChange.parent.getViewById("TextView"); if (lbl.style.whiteSpace === "normal") { lbl.style.whiteSpace = "nowrap"; + btn.style.whiteSpace = "nowrap"; + textField.style.whiteSpace = "nowrap"; + textView.style.whiteSpace = "nowrap"; } else if (lbl.style.whiteSpace === "nowrap") { lbl.style.whiteSpace = "normal"; + btn.style.whiteSpace = "normal"; + textField.style.whiteSpace = "normal"; + textView.style.whiteSpace = "normal"; } } \ No newline at end of file diff --git a/apps/ui-tests-app/css/white-space.xml b/apps/ui-tests-app/css/white-space.xml index 869c5a988..89ffb21a1 100644 --- a/apps/ui-tests-app/css/white-space.xml +++ b/apps/ui-tests-app/css/white-space.xml @@ -1,9 +1,13 @@  -