Skip to content

Commit 6692dc3

Browse files
vchimevvchimev
vchimev
authored and
vchimev
committed
Add automationText properties
1 parent be82e7b commit 6692dc3

File tree

3 files changed

+19
-15
lines changed

3 files changed

+19
-15
lines changed

app/action-bar/action-bar-first.component.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,21 @@ import {NS_ROUTER_DIRECTIVES} from "nativescript-angular/router/ns-router";
55
selector: "first-action-bar",
66
directives: [NS_ROUTER_DIRECTIVES],
77
template: `
8-
<ActionBar title="Title 1">
9-
<ActionItem *ngIf="show" text="action" (tap)="onTap()" [nsRouterLink]="['Second']"></ActionItem>
10-
<ActionItem (tap)="onShare()" ios.systemIcon="9" ios.position="left"
11-
android.systemIcon="ic_menu_share_holo_light" android.position="actionBar"></ActionItem>
12-
<ActionItem (tap)="onDelete()" ios.systemIcon="16" ios.position="right"
13-
android.position="popup" text="delete"></ActionItem>
8+
<ActionBar title="Title 1" automationText="title">
9+
<ActionItem *ngIf="show" text="action" (tap)="onTap()" [nsRouterLink]="['Second']"
10+
automationText="action"></ActionItem>
11+
<ActionItem (tap)="onShare()" ios.systemIcon="9" ios.position="left"
12+
android.systemIcon="ic_menu_share_holo_light" android.position="actionBar"
13+
automationText="share"></ActionItem>
14+
<ActionItem text="delete" (tap)="onDelete()"
15+
ios.systemIcon="16" ios.position="right"
16+
android.position="popup"
17+
automationText="delete"></ActionItem>
1418
</ActionBar>
1519
1620
<StackLayout verticalAlignment="center">
17-
<Label [text]="messageShare"></Label>
18-
<Label [text]="messageDelete"></Label>
21+
<Label [text]="messageShare" automationText="lblShare"></Label>
22+
<Label [text]="messageDelete" automationText="lblDelete"></Label>
1923
</StackLayout>
2024
`,
2125
})

app/action-bar/action-bar-nested.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ import {NS_ROUTER_DIRECTIVES} from "nativescript-angular/router/ns-router";
77
template: `
88
<ActionBarExtension>
99
<ActionItem *ngIf="show" (tap)="onTap()">
10-
<Button text="CUSTOM"></Button>
10+
<Button text="CUSTOM" automationText="btnCustom"></Button>
1111
</ActionItem>
1212
</ActionBarExtension>
1313
1414
<StackLayout orientation="horizontal" horizontalAlignment="center">
15-
<Button [text]="show ? 'hide' : 'show'" (tap)="show = !show"></Button>
16-
<Label [text]="message"></Label>
15+
<Button [text]="show ? 'hide' : 'show'" (tap)="show = !show" automationText="btnShowHide"></Button>
16+
<Label [text]="message" automationText="lblCustom"></Label>
1717
</StackLayout>
1818
`,
1919
})

app/action-bar/action-bar-second.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import {NS_ROUTER_DIRECTIVES} from "nativescript-angular/router/ns-router";
66
selector: "second-action-bar",
77
directives: [NS_ROUTER_DIRECTIVES, NestedComponent],
88
template: `
9-
<ActionBar title="Title 2">
10-
<NavigationButton text="First" android.systemIcon="ic_menu_back"></NavigationButton>
11-
<ActionItem [text]="message"></ActionItem>
12-
<ActionItem text="TAP" (tap)="onTap()"></ActionItem>
9+
<ActionBar title="Title 2" automationText="title">
10+
<NavigationButton text="First" android.systemIcon="ic_menu_back" automationText="back"></NavigationButton>
11+
<ActionItem [text]="message" automationText="msg"></ActionItem>
12+
<ActionItem text="TAP" (tap)="onTap()" automationText="tap"></ActionItem>
1313
</ActionBar>
1414
1515
<StackLayout verticalAlignment="center">

0 commit comments

Comments
 (0)