Skip to content

Commit 0bf5069

Browse files
tests: init
1 parent 63b1d55 commit 0bf5069

23 files changed

+1011
-15294
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/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: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
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({
@@ -11,6 +13,7 @@ class Link {
1113
<Button
1214
[text]="item.title"
1315
[nsRouterLink]="item.link"
16+
[automationText]="item.link.replace('/', '')"
1417
></Button>
1518
</ng-template>
1619
</ListView>

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/options.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ import { Component } from "@angular/core";
77
<Button
88
*ngIf="animationData.value === 'active'"
99
[@someCoolAnimation]="animationData"
10+
automationText="animatedBtn"
1011
text="hello there"
1112
></Button>
1213
1314
<Button
1415
(tap)="fadeOut()"
1516
text="Remove above button"
1617
backgroundColor="green"
18+
automationText="toggleAnimation"
1719
color="white"
1820
></Button>
1921
</StackLayout>

app/query-stagger.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import { Component } from "@angular/core";
2727
<StackLayout>
2828
<Button (tap)="add()" text="ADD" backgroundColor="hotpink"></Button>
2929
30-
<StackLayout [@listAnimation]="items.length">
30+
<StackLayout [@listAnimation]="items.length" automationText="container" >
3131
<Button *ngFor="let item of items" [text]="item" class="ani-button"></Button>
3232
</StackLayout>
3333
</StackLayout>

app/selector-all.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ import { Component } from "@angular/core";
2929
]),
3030
],
3131
template: `
32-
<FlexboxLayout flexDirection="column">
32+
<FlexboxLayout flexDirection="column"
33+
automationText="itemsContainer">
3334
<Button text="add" (tap)="items.push('random')"></Button>
3435
3536
<FlexboxLayout
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
{
2+
"android19": {
3+
"platformName": "Android",
4+
"platformVersion": "4.4",
5+
"deviceName": "Emulator-Api19-Default",
6+
"avd": "Emulator-Api19-Default",
7+
"lt": 60000,
8+
"newCommandTimeout": 720,
9+
"noReset": true,
10+
"fullReset": false,
11+
"app": ""
12+
},
13+
"android21": {
14+
"platformName": "Android",
15+
"platformVersion": "5.0",
16+
"deviceName": "Emulator-Api21-Default",
17+
"avd": "Emulator-Api21-Default",
18+
"lt": 60000,
19+
"newCommandTimeout": 720,
20+
"noReset": true,
21+
"fullReset": false,
22+
"app": ""
23+
},
24+
"android23": {
25+
"platformName": "Android",
26+
"platformVersion": "6.0",
27+
"deviceName": "Emulator-Api23-Default",
28+
"avd": "Emulator-Api23-Default",
29+
"lt": 60000,
30+
"newCommandTimeout": 720,
31+
"noReset": true,
32+
"fullReset": false,
33+
"app": ""
34+
},
35+
"android24": {
36+
"platformName": "Android",
37+
"platformVersion": "7.0",
38+
"deviceName": "Emulator-Api24-Default",
39+
"avd": "Emulator-Api24-Default",
40+
"lt": 60000,
41+
"newCommandTimeout": 720,
42+
"noReset": true,
43+
"fullReset": false,
44+
"app": ""
45+
},
46+
"android25": {
47+
"platformName": "Android",
48+
"platformVersion": "7.1",
49+
"deviceName": "Emulator-Api25-Google",
50+
"avd": "Emulator-Api25-Google",
51+
"lt": 60000,
52+
"newCommandTimeout": 720,
53+
"noReset": true,
54+
"fullReset": false,
55+
"app": ""
56+
},
57+
"android26": {
58+
"platformName": "Android",
59+
"platformVersion": "8.0",
60+
"deviceName": "Emulator-Api26-Google",
61+
"avd": "Emulator-Api26-Google",
62+
"lt": 60000,
63+
"newCommandTimeout": 720,
64+
"noReset": true,
65+
"fullReset": false,
66+
"app": ""
67+
},
68+
"android27": {
69+
"platformName": "Android",
70+
"platformVersion": "27",
71+
"deviceName": "Emulator-Api27-Google",
72+
"avd": "Emulator-Api27-Google",
73+
"lt": 60000,
74+
"newCommandTimeout": 720,
75+
"noReset": true,
76+
"fullReset": false,
77+
"app": ""
78+
},
79+
"sim.iPhone7.100": {
80+
"platformName": "iOS",
81+
"platformVersion": "10.0",
82+
"deviceName": "iPhone 7",
83+
"noReset": true,
84+
"fullReset": false,
85+
"app": ""
86+
},
87+
"sim.iPhone7.110": {
88+
"platformName": "iOS",
89+
"platformVersion": "11.0",
90+
"deviceName": "iPhone 7 110",
91+
"noReset": true,
92+
"fullReset": false,
93+
"app": ""
94+
},
95+
"sim.iPhone8": {
96+
"platformName": "iOS",
97+
"platformVersion": "11.3",
98+
"deviceName": "iPhone 8",
99+
"noReset": true,
100+
"fullReset": false,
101+
"app": ""
102+
},
103+
"sim.iPhoneX": {
104+
"platformName": "iOS",
105+
"platformVersion": "11.3",
106+
"deviceName": "iPhone X",
107+
"noReset": true,
108+
"fullReset": false,
109+
"app": ""
110+
}
111+
}

e2e/config/mocha.opts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
--timeout 999999
2+
--recursive e2e
3+
--reporter mocha-multi
4+
--reporter-options spec=-,mocha-junit-reporter=test-results.xml
5+
--exit

0 commit comments

Comments
 (0)