Include test case for item 4151

This commit is contained in:
SvetoslavTsenov
2017-05-16 17:19:52 +03:00
parent d4e4841b59
commit 2079201006
6 changed files with 37 additions and 16 deletions

View File

@ -7,5 +7,5 @@ export function onShownModally(args: ShownModallyData) {
} }
export function onTap() { export function onTap() {
closeCallback("sample text"); closeCallback("sample text\n");
} }

View File

@ -1,4 +1,7 @@
import { ShownModallyData } from "tns-core-modules/ui/page"; import { ShownModallyData } from "tns-core-modules/ui/page";
import { Button } from "tns-core-modules/ui/button";
import { Label } from "tns-core-modules/ui/label"
import { Page } from "tns-core-modules/ui/page"
let closeCallback: Function; let closeCallback: Function;
@ -7,5 +10,19 @@ export function onShownModally(args: ShownModallyData) {
} }
export function onTap() { export function onTap() {
closeCallback("sample text"); closeCallback("sample text\n");
}
export function change(args){
var button:Button =<Button>args.object;
var page:Page =<Page> button.parent;
console.log("---------------------page-------------------------")
console.log(page)
var label:Label = <Label> page.getViewById("label1");
label.text="fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo";
var label2:Label = <Label> page.getViewById("label2");
label2.text="foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo";
} }

View File

@ -1,5 +1,8 @@
<Page showingModally="onShownModally"> <Page showingModally="onShownModally">
<StackLayout id="layout" > <StackLayout id="layout" >
<Label backgroundColor="green" id="label1" text="short" textWrap="true" />
<Label backgroundColor="red" id="label2" text="" textWrap="true" />
<Button text="Change text" tap="change" />
<Button text="Close" tap="onTap" /> <Button text="Close" tap="onTap" />
</StackLayout> </StackLayout>
</Page> </Page>

View File

@ -4,7 +4,7 @@ import { topmost } from "tns-core-modules/ui/frame";
export function btnClick(args: EventData) { export function btnClick(args: EventData) {
(<Page>args.object).page.showModal("ui-tests-app/action-bar/modal-page", "", function (arg: string) { (<Page>args.object).page.showModal("ui-tests-app/action-bar/modal-page", "", function (arg: string) {
// ... console.log("Callback args: " + arg);
}, true); }, true);
} }

View File

@ -5,6 +5,7 @@ import { topmost } from "tns-core-modules/ui/frame";
export function btnClick(args: EventData) { export function btnClick(args: EventData) {
(<Page>args.object).page.showModal("ui-tests-app/action-bar/modal-page-hidden-action-bar", "", function (arg: string) { (<Page>args.object).page.showModal("ui-tests-app/action-bar/modal-page-hidden-action-bar", "", function (arg: string) {
// ... // ...
console.log("Callback args: " + arg);
}, true); }, true);
} }