From 2efafc3a4fba66ce269ba74ac91aa3b5233a663b Mon Sep 17 00:00:00 2001 From: Svetoslav Date: Wed, 20 Mar 2019 18:15:48 +0200 Subject: [PATCH] test: update test samples (#7016) * test: update test samples --- apps/app/ui-tests-app/action-bar/icons.xml | 2 +- .../ui-tests-app/action-bar/local-icons.xml | 2 +- apps/app/ui-tests-app/intent/main-page.ts | 17 ------ apps/app/ui-tests-app/intent/main-page.xml | 6 -- apps/app/ui-tests-app/intent/open-file.xml | 5 -- apps/app/ui-tests-app/issues/main-page.ts | 1 + .../open-file.ts => issues/open-file-6895.ts} | 0 .../ui-tests-app/issues/open-file-6895.xml | 5 ++ .../ui-tests-app/layouts/passThroughParent.ts | 51 +++++++++++------ .../layouts/passThroughParent.xml | 36 ++++++------ apps/app/ui-tests-app/main-page.ts | 1 - .../scroll-view/layout-outside-scroll.xml | 8 +-- .../tab-view/icon-title-placement.xml | 6 +- apps/app/ui-tests-app/tab-view/issue-5470.xml | 4 +- .../app/home/home-page.ts | 5 ++ .../app/home/home-page.xml | 1 + .../e2e/issues.e2e.spec.ts | 55 +++++++++++++++++++ e2e/nested-frame-navigation/e2e/screen.ts | 14 ++--- 18 files changed, 139 insertions(+), 80 deletions(-) delete mode 100644 apps/app/ui-tests-app/intent/main-page.ts delete mode 100644 apps/app/ui-tests-app/intent/main-page.xml delete mode 100644 apps/app/ui-tests-app/intent/open-file.xml rename apps/app/ui-tests-app/{intent/open-file.ts => issues/open-file-6895.ts} (100%) create mode 100644 apps/app/ui-tests-app/issues/open-file-6895.xml create mode 100644 e2e/nested-frame-navigation/e2e/issues.e2e.spec.ts diff --git a/apps/app/ui-tests-app/action-bar/icons.xml b/apps/app/ui-tests-app/action-bar/icons.xml index 7862fe83b..cde351035 100644 --- a/apps/app/ui-tests-app/action-bar/icons.xml +++ b/apps/app/ui-tests-app/action-bar/icons.xml @@ -8,7 +8,7 @@ - - - \ No newline at end of file diff --git a/apps/app/ui-tests-app/issues/main-page.ts b/apps/app/ui-tests-app/issues/main-page.ts index 349b9634c..7afaa8783 100644 --- a/apps/app/ui-tests-app/issues/main-page.ts +++ b/apps/app/ui-tests-app/issues/main-page.ts @@ -30,6 +30,7 @@ export function loadExamples() { examples.set("ng-repo-1599", "issues/issue-ng-repo-1599"); examples.set("ng-repo-1626", "issues/issue-ng-repo-1626"); examples.set("6439", "issues/issue-6439"); + examples.set("open-file-6895", "issues/open-file-6895") return examples; } \ No newline at end of file diff --git a/apps/app/ui-tests-app/intent/open-file.ts b/apps/app/ui-tests-app/issues/open-file-6895.ts similarity index 100% rename from apps/app/ui-tests-app/intent/open-file.ts rename to apps/app/ui-tests-app/issues/open-file-6895.ts diff --git a/apps/app/ui-tests-app/issues/open-file-6895.xml b/apps/app/ui-tests-app/issues/open-file-6895.xml new file mode 100644 index 000000000..fc938d3ff --- /dev/null +++ b/apps/app/ui-tests-app/issues/open-file-6895.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/apps/app/ui-tests-app/layouts/passThroughParent.ts b/apps/app/ui-tests-app/layouts/passThroughParent.ts index 1080e0b3c..2406d170c 100644 --- a/apps/app/ui-tests-app/layouts/passThroughParent.ts +++ b/apps/app/ui-tests-app/layouts/passThroughParent.ts @@ -1,19 +1,36 @@ -export function onOuterWrapLayoutTap() { - console.log("on outer wrap layout tap"); -} +import { EventData, Page } from "tns-core-modules/ui/page/page"; +import { Label } from "tns-core-modules/ui/label/label"; -export function onStackLayoutThrowTap() { - throw new Error("Should not tap layout with IsPassThroughParentEnabled=true"); -} - -export function onUserInteractionDisabledTap() { - throw new Error("Should not tap button with IsUserInteractionEnabled=false"); -} - -export function onDisabledThrowTap() { - throw new Error("Should not tap button with IsEnabled=false"); -} - -export function onTap() { +const setLabelTextAndLog = (args, text: string) => { + const page = args.object.page; + const label =