Skip to content

Commit e34cbb7

Browse files
committed
test(e2e): add ActionBarExtension component
1 parent e59a543 commit e34cbb7

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { Component } from "@angular/core";
2+
3+
@Component({
4+
template: `
5+
<ActionBarExtension>
6+
<ActionItem (tap)="show = !show" text="toggle">
7+
</ActionItem>
8+
9+
<ActionItem *ngIf="show" text="conditional">
10+
</ActionItem>
11+
</ActionBarExtension>
12+
`
13+
})
14+
export class ActionBarExtensionComponent {
15+
public show = true;
16+
}

e2e/renderer/app/app-routing.module.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";
22
import { NativeScriptRouterModule } from "nativescript-angular/router";
33

44
import { ActionBarDynamicItemsComponent } from "./action-bar/action-bar-dynamic-items.component";
5+
import { ActionBarExtensionComponent } from "./action-bar/action-bar-extension.component";
56

67
import { ListComponent } from "./list.component";
78
import { NgForComponent } from "./ngfor.component";
@@ -23,6 +24,10 @@ export const routes = [
2324
path: "action-bar-dynamic",
2425
component: ActionBarDynamicItemsComponent,
2526
},
27+
{
28+
path: "action-bar-extension",
29+
component: ActionBarExtensionComponent,
30+
},
2631
{
2732
path: "list",
2833
component: ListComponent,
@@ -63,6 +68,8 @@ export const routes = [
6368

6469
export const navigatableComponents = [
6570
ActionBarDynamicItemsComponent,
71+
ActionBarExtensionComponent,
72+
6673
ListComponent,
6774
NgForComponent,
6875
NgForOfComponent,

e2e/renderer/app/list.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Component } from "@angular/core";
44
template: `
55
<FlexboxLayout flexDirection="column">
66
<Button text="ActionBar dynamic" [nsRouterLink]="['/action-bar-dynamic']"></Button>
7+
<Button text="ActionBarExtension" [nsRouterLink]="['/action-bar-extension']"></Button>
78
<Button text="NgFor" [nsRouterLink]="['/ngfor']"></Button>
89
<Button text="NgForOf" [nsRouterLink]="['/ngforof']"></Button>
910
<Button text="NgIf no layout" [nsRouterLink]="['/ngif-no-layout']"></Button>

0 commit comments

Comments
 (0)