Skip to content

Commit da80cd5

Browse files
authored
test: added missing page (#8493)
* test: added missing page * fix: use strings instead of Visiblity
1 parent ad9daa8 commit da80cd5

2 files changed

Lines changed: 46 additions & 0 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { Label } from "tns-core-modules/ui/label";
2+
import { EventData, TextBase } from "tns-core-modules/ui/text-base";
3+
import { Page } from "tns-core-modules/ui/page";
4+
5+
export function foxTap(args: EventData) {
6+
let page = <Page>(<any>args.object).page;
7+
let foxTapped = page.getViewById<Label>("foxTapped");
8+
foxTapped.visibility = "visible";
9+
10+
setTimeout(() => {
11+
foxTapped.visibility = "hidden";
12+
}, 1000);
13+
14+
console.log("foxTap");
15+
}
16+
17+
export function dogTap(args: EventData) {
18+
let page = <Page>(<any>args.object).page;
19+
let dogTapped = page.getViewById<Label>("dogTapped");
20+
dogTapped.visibility = "visible";
21+
22+
setTimeout(() => {
23+
dogTapped.visibility = "hidden";
24+
}, 1000);
25+
26+
console.log("dogTap");
27+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<Page>
2+
<StackLayout style="font-size: 50">
3+
<Label automationText="formattedText" id="formattedText" textWrap="true" style="text-transform: capitalize;">
4+
<Label.formattedText>
5+
<FormattedString>
6+
<FormattedString.spans>
7+
<Span text="The quick brown " style="font-weight: bold; color: green;" />
8+
<Span text="fox" style="font-weight: italic; color: green;" linkTap="foxTap"/>
9+
<Span text=" jumps over the lazy " style="font-weight: bold; color: red;" />
10+
<Span text="dog" style="font-weight: bold; color: blue;" linkTap="dogTap"/>
11+
<Span text="." style="font-weight: bold; color: green;" />
12+
</FormattedString.spans>
13+
</FormattedString>
14+
</Label.formattedText>
15+
</Label>
16+
<Label id="foxTapped" text="Fox tapped" visibility="hidden" color="green"/>
17+
<Label id="dogTapped" text="Dog tapped" visibility="hidden" color="blue"/>
18+
</StackLayout>
19+
</Page>

0 commit comments

Comments
 (0)