Skip to content

Commit e539bb2

Browse files
Merge pull request #5 from NativeScript/svetoslavtsenov/e2e
tests: include smoke e2e tests
2 parents 63b1d55 + 2defebb commit e539bb2

File tree

92 files changed

+805
-15312
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+805
-15312
lines changed

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@ hooks
44
.vscode
55

66
app/**/*.js
7+
app/**/*.map
8+
9+
e2e/**/*.js
10+
e2e/**/*.map
711

812
# Webpack files
913
tsconfig.esm.json
1014
webpack.config.js
11-
15+
instruments*
16+
e2e/reports
17+
test-results.xml

app/animate-child.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import { Component } from "@angular/core";
1010

1111
@Component({
1212
template: `
13-
<StackLayout class="parent" width="500" height="500" [@parent]="parentVal">
14-
<StackLayout class="child" [@child]="childVal"></StackLayout>>
13+
<StackLayout class="parent" width="500" height="500" [@parent]="parentVal" automationText="parent">
14+
<StackLayout class="child" [@child]="childVal" automationText="child"></StackLayout>>
1515
</StackLayout>
1616
`,
1717
animations: [

app/animation-builder.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Component, ViewChild } from '@angular/core';
33

44
@Component({
55
template: `
6-
<Button #button (tap)="makeAnimation()" class="btn btn-primary" text="Tap to disappear!"></Button>
6+
<Button #button (tap)="makeAnimation()" class="btn btn-primary" automationText="tapToDisappear" text="Tap to disappear!"></Button>
77
`
88
})
99
export class AnimationBuilderComponent {

app/animations-list.component.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
import { Component } from '@angular/core';
22

33
class Link {
4-
constructor(public title: string, public link: string) {}
4+
constructor(public title: string, public link: string, public id?: string) {
5+
this.id = this.id || this.link.replace("/", "");
6+
}
57
}
68

79
@Component({
810
template: `
9-
<ListView [items]="links">
10-
<ng-template let-item="item">
11-
<Button
12-
[text]="item.title"
13-
[nsRouterLink]="item.link"
14-
></Button>
15-
</ng-template>
16-
</ListView>
11+
<WrapLayout [items]="links">
12+
<Button
13+
*ngFor="let item of links"
14+
[text]="item.title"
15+
[nsRouterLink]="item.link"
16+
[automationText]="item.link.replace('/', '')">
17+
</Button>
18+
</WrapLayout>
1719
`
1820
})
1921
export class AnimationsListComponent {

app/app.android.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Button {
2+
font-size: 8px;
3+
padding: 0px;
4+
margin: 0px;
5+
}
6+
7+
Label{
8+
font-size: 8px;
9+
}

app/app.css

Whitespace-only changes.

app/external-animation.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,20 @@ import { fadeAnimation } from "./animations";
99
<Button
1010
[@coolAnimation]="isVisible"
1111
text="Nice button."
12+
automationText="animatedBtn"
1213
></Button>
1314
1415
<Button
1516
(tap)="toggle()"
1617
text="Toggle"
18+
automationText="toggleAnimation"
1719
backgroundColor="green"
1820
color="white"
1921
></Button>
2022
</StackLayout>
2123
`,
2224
animations: [
2325
trigger("coolAnimation", [
24-
2526
transition("invisible => visible", [
2627
useAnimation(fadeAnimation, {
2728
params: {
@@ -37,7 +38,7 @@ import { fadeAnimation } from "./animations";
3738
params: {
3839
from: 1,
3940
to: 0,
40-
time: "0.4s",
41+
time: "1.0s",
4142
},
4243
})
4344
]),

app/fade-in-out.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ import { trigger, transition, style, animate } from "@angular/animations";
99
[@someCoolAnimation]="bindingVar"
1010
(tap)="hide()"
1111
backgroundColor="hotpink"
12+
automationText="animatedBtn"
1213
height="200"
1314
></Button>
1415
1516
<Button
1617
text="Toggle!"
1718
(tap)="toggle()"
1819
backgroundColor="red"
20+
automationText="toggleAnimation"
1921
></Button>
2022
</StackLayout>
2123
`,

app/hero/hero-team-builder.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<FlexboxLayout flexDirection="column">
22
<FlexboxLayout>
3-
<Button (tap)="heroes.addInactive()" text="Add inactive" ></Button>
4-
<Button (tap)="heroes.addActive()" text="Add active"></Button>
5-
<Button (tap)="heroes.remove()" text="Remove"></Button>
6-
<Button (tap)="heroes.reset()" text="Reset"></Button>
3+
<Button (tap)="heroes.addInactive()" text="Add inactive" automationText="addInactive" ></Button>
4+
<Button (tap)="heroes.addActive()" text="Add active" automationText="addActive" ></Button>
5+
<Button (tap)="heroes.remove()" text="Remove" automationText="remove" ></Button>
6+
<Button (tap)="heroes.reset()" text="Reset" automationText="reset" ></Button>
77
</FlexboxLayout>
88

99
<FlexboxLayout flexDirection="column">

app/options-default.component.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,26 @@ import {
99

1010
@Component({
1111
template: `
12-
<StackLayout>
12+
<StackLayout automationText="itemsContainer">
1313
<Button
1414
text="Add hero"
1515
(tap)="addNew()"
1616
[isEnabled]="extraHeroes.length > 0"
1717
[ngClass]="extraHeroes.length > 0 ? 'enabled' : 'disabled'"
18+
automationText="add"
1819
></Button>
1920
2021
2122
<Button
2223
*ngFor="let hero of heroes"
23-
[text]="hero"
24+
[text]="hero"
2425
[@flyInOut]="'in'"
2526
(tap)="flyOut(hero)"
2627
backgroundColor="hotpink"
28+
[automationText]="hero"
2729
height="75"
2830
></Button>
29-
31+
3032
</StackLayout>
3133
`,
3234
styles: [

0 commit comments

Comments
 (0)