Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions e2e/ui-tests-app/app/button/tappable-span-page.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { Label } from "tns-core-modules/ui/label";
import { EventData, TextBase } from "tns-core-modules/ui/text-base";
import { Page } from "tns-core-modules/ui/page";

export function foxTap(args: EventData) {
let page = <Page>(<any>args.object).page;
let foxTapped = page.getViewById<Label>("foxTapped");
foxTapped.visibility = "visible";

setTimeout(() => {
foxTapped.visibility = "hidden";
}, 1000);

console.log("foxTap");
}

export function dogTap(args: EventData) {
let page = <Page>(<any>args.object).page;
let dogTapped = page.getViewById<Label>("dogTapped");
dogTapped.visibility = "visible";

setTimeout(() => {
dogTapped.visibility = "hidden";
}, 1000);

console.log("dogTap");
}
19 changes: 19 additions & 0 deletions e2e/ui-tests-app/app/button/tappable-span-page.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Page>
<StackLayout style="font-size: 50">
<Label automationText="formattedText" id="formattedText" textWrap="true" style="text-transform: capitalize;">
<Label.formattedText>
<FormattedString>
<FormattedString.spans>
<Span text="The quick brown " style="font-weight: bold; color: green;" />
<Span text="fox" style="font-weight: italic; color: green;" linkTap="foxTap"/>
<Span text=" jumps over the lazy " style="font-weight: bold; color: red;" />
<Span text="dog" style="font-weight: bold; color: blue;" linkTap="dogTap"/>
<Span text="." style="font-weight: bold; color: green;" />
</FormattedString.spans>
</FormattedString>
</Label.formattedText>
</Label>
<Label id="foxTapped" text="Fox tapped" visibility="hidden" color="green"/>
<Label id="dogTapped" text="Dog tapped" visibility="hidden" color="blue"/>
</StackLayout>
</Page>