Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit c99e228

Browse files
vchimevvchimev
vchimev
authored and
vchimev
committed
test(TypeScriptApp): update demo and add tests
1 parent 5a42e32 commit c99e228

File tree

17 files changed

+316
-33
lines changed

17 files changed

+316
-33
lines changed

‎demo/.gitignore‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1-
webpack.config.js
2-
1+
node_modules
32
platforms
3+
hooks
44
report
55

6+
**/*.map
7+
8+
reports/
9+
test-results.xml
10+
11+
tsconfig.aot.json
12+
613
vendor.js
714
vendor-platform.android.js
815
vendor-platform.ios.js
@@ -11,4 +18,4 @@ vendor.ts
1118
vendor-platform.android.ts
1219
vendor-platform.ios.ts
1320

14-
tsconfig.aot.json
21+
webpack.config.js

‎demo/AngularApp/tsconfig.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
}
2121
},
2222
"exclude": [
23+
"e2e",
2324
"node_modules",
2425
"platforms",
2526
"**/*.aot.ts"

‎demo/JavaScriptApp/package.json‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@
55
"repository": "<fill-your-repository-here>",
66
"nativescript": {
77
"id": "org.nativescript.JavaScriptApp",
8-
"tns-android": {
9-
"version": "3.4.0-2017年11月13日-2"
10-
},
118
"tns-ios": {
12-
"version": "3.4.0-2017年11月9日-1"
9+
"version": "next"
10+
},
11+
"tns-android": {
12+
"version": "next"
1313
}
1414
},
1515
"dependencies": {
1616
"nativescript-theme-core": "~1.0.2",
17-
"tns-core-modules": "file:../../../NativeScript/tns-core-modules",
18-
"tns-core-modules-widgets": "^3.4.0-2017年11月2日-1"
17+
"tns-core-modules": "next"
1918
},
2019
"devDependencies": {
2120
"babel-traverse": "6.26.0",

‎demo/TypeScriptApp/.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
app/**/*.js
2+
e2e/**/*.js
3+
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "launch",
10+
"name": "Android",
11+
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
12+
"args": [
13+
"-u",
14+
"tdd",
15+
"--timeout",
16+
"999999",
17+
"--colors",
18+
"--opts",
19+
"./e2e/config/mocha.opts",
20+
"--runType",
21+
"android23",
22+
"--reuseDevice"
23+
// "${workspaceFolder}/test"
24+
],
25+
"internalConsoleOptions": "openOnSessionStart"
26+
},
27+
{
28+
"type": "node",
29+
"request": "launch",
30+
"name": "IOS",
31+
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
32+
"args": [
33+
"-u",
34+
"tdd",
35+
"--timeout",
36+
"999999",
37+
"--colors",
38+
"--opts",
39+
"./e2e/config/mocha.opts",
40+
"--runType",
41+
"sim.iPhoneX.iOS111",
42+
"--reuseDevice"
43+
// "${workspaceFolder}/test"
44+
],
45+
"internalConsoleOptions": "openOnSessionStart"
46+
},
47+
{
48+
"type": "node",
49+
"request": "launch",
50+
"name": "Launch Program",
51+
"program": "${file}"
52+
}
53+
]
54+
}

‎demo/TypeScriptApp/app/main-page.android.xml‎

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ https://docs.nativescript.org/ui/components.
1010
http://docs.nativescript.org/ui/action-bar
1111
-->
1212
<Page.actionBar>
13-
<ActionBar title="My App" icon="">
14-
</ActionBar>
13+
<ActionBar title="My App" icon=""></ActionBar>
1514
</Page.actionBar>
1615
<!--
1716
The StackLayout stacks UI components on the screen—either vertically or horizontally.
@@ -25,15 +24,18 @@ https://docs.nativescript.org/ui/components.
2524
class names available for styling your app at https://docs.nativescript.org/ui/theme.
2625
-->
2726
<StackLayout class="p-20">
28-
<StackLayout horizontalAlignment="left" verticalAlignment="top" orientation="horizontal">
29-
<GridLayout width="30px" height="30px" backgroundColor="#7F9" margin="10px" />
30-
<GridLayout width="30px" height="30px" class="app-class" margin="10px" />
31-
<GridLayout width="30px" height="30px" class="page-class" margin="10px" />
32-
</StackLayout>
27+
<GridLayout rows="auto, auto, auto" columns="auto, auto">
28+
<GridLayout row="0" automationText="styleInline" width="30px" height="30px" backgroundColor="#7F9" margin="10px" />
29+
<Label row="0" col="1" text="inline style" verticalAlignment="center" />
30+
<GridLayout row="1" automationText="stylePage" width="30px" height="30px" class="page-class" margin="10px" />
31+
<Label row="1" col="1" text="page style" verticalAlignment="center" />
32+
<GridLayout row="2" automationText="styleApp" width="30px" height="30px" class="app-class" margin="10px" />
33+
<Label row="2" col="1" text="app style" verticalAlignment="center" />
34+
</GridLayout>
3335
<Label text="Tap the button" class="h1 text-center"/>
3436
<Button text="TAP" tap="{{ onTap }}" class="btn btn-primary btn-active"/>
3537
<Label text="{{ message }}" class="h2 text-center" textWrap="true"/>
36-
<Button text="Android, Navigate to second-page.xml" tap="goToSecondPage" />
38+
<Button automationText="btnNav"text="Android, Navigate to second-page.xml" tap="goToSecondPage" />
3739
<Label id="platform" text="-" />
3840
</StackLayout>
39-
</Page>
41+
</Page>

‎demo/TypeScriptApp/app/main-page.ios.xml‎

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ https://docs.nativescript.org/ui/components.
1010
http://docs.nativescript.org/ui/action-bar
1111
-->
1212
<Page.actionBar>
13-
<ActionBar title="My App" icon="">
14-
</ActionBar>
13+
<ActionBar title="My App" icon=""></ActionBar>
1514
</Page.actionBar>
1615
<!--
1716
The StackLayout stacks UI components on the screen—either vertically or horizontally.
@@ -25,15 +24,18 @@ https://docs.nativescript.org/ui/components.
2524
class names available for styling your app at https://docs.nativescript.org/ui/theme.
2625
-->
2726
<StackLayout class="p-20">
28-
<StackLayout horizontalAlignment="left" verticalAlignment="top" orientation="horizontal">
29-
<GridLayout width="30px" height="30px" backgroundColor="#999" margin="10px" />
30-
<GridLayout width="30px" height="30px" class="app-class" margin="10px" />
31-
<GridLayout width="30px" height="30px" class="page-class" margin="10px" />
32-
</StackLayout>
27+
<GridLayout rows="auto, auto, auto" columns="auto, auto">
28+
<GridLayout row="0" automationText="styleInline" width="30px" height="30px" backgroundColor="#999" margin="10px" />
29+
<Label row="0" col="1" text="inline style" verticalAlignment="center" />
30+
<GridLayout row="1" automationText="stylePage" width="30px" height="30px" class="page-class" margin="10px" />
31+
<Label row="1" col="1" text="page style" verticalAlignment="center" />
32+
<GridLayout row="2" automationText="styleApp" width="30px" height="30px" class="app-class" margin="10px" />
33+
<Label row="2" col="1" text="app style" verticalAlignment="center" />
34+
</GridLayout>
3335
<Label text="Tap the button" class="h1 text-center"/>
3436
<Button text="TAP" tap="{{ onTap }}" class="btn btn-primary btn-active"/>
3537
<Label text="{{ message }}" class="h2 text-center" textWrap="true"/>
36-
<Button text="iOS, Navigate to second-page.xml" tap="goToSecondPage" />
38+
<Button automationText="btnNav"text="iOS, Navigate to second-page.xml" tap="goToSecondPage" />
3739
<Label id="platform" text="-" />
3840
</StackLayout>
39-
</Page>
41+
</Page>

‎demo/TypeScriptApp/app/views/second-page.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
</ActionBar>
55
</Page.actionBar>
66
<GridLayout>
7-
<Button text="0" width="110" height="110" tap="secondPageTap" />
7+
<Button automationText="btn"text="0" width="110" height="110" tap="secondPageTap" />
88
</GridLayout>
99
</Page>
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
{
2+
"android19": {
3+
"platformName": "Android",
4+
"platformVersion": "4.4",
5+
"deviceName": "Emulator-Api19-Default",
6+
"avd": "Emulator-Api19-Default",
7+
"lt": 60000,
8+
"appActivity": "com.tns.NativeScriptActivity",
9+
"newCommandTimeout": 720,
10+
"noReset": true,
11+
"fullReset": false,
12+
"app": ""
13+
},
14+
"android21": {
15+
"platformName": "Android",
16+
"platformVersion": "5.0",
17+
"deviceName": "Emulator-Api21-Default",
18+
"avd": "Emulator-Api21-Default",
19+
"lt": 60000,
20+
"appActivity": "com.tns.NativeScriptActivity",
21+
"newCommandTimeout": 720,
22+
"noReset": true,
23+
"fullReset": false,
24+
"app": ""
25+
},
26+
"android23": {
27+
"platformName": "Android",
28+
"platformVersion": "6.0",
29+
"deviceName": "Emulator-Api23-Default",
30+
"avd": "Emulator-Api23-Default",
31+
"lt": 60000,
32+
"appActivity": "com.tns.NativeScriptActivity",
33+
"newCommandTimeout": 720,
34+
"noReset": true,
35+
"fullReset": false,
36+
"app": ""
37+
},
38+
"android24": {
39+
"platformName": "Android",
40+
"platformVersion": "7.0",
41+
"deviceName": "Emulator-Api24-Default",
42+
"avd": "Emulator-Api24-Default",
43+
"lt": 60000,
44+
"appActivity": "com.tns.NativeScriptActivity",
45+
"newCommandTimeout": 720,
46+
"noReset": true,
47+
"fullReset": false,
48+
"app": ""
49+
},
50+
"android25": {
51+
"platformName": "Android",
52+
"platformVersion": "7.1",
53+
"deviceName": "Emulator-Api25-Google",
54+
"avd": "Emulator-Api25-Google",
55+
"lt": 60000,
56+
"appActivity": "com.tns.NativeScriptActivity",
57+
"newCommandTimeout": 720,
58+
"noReset": true,
59+
"fullReset": false,
60+
"app": ""
61+
},
62+
"android26": {
63+
"platformName": "Android",
64+
"platformVersion": "8.0",
65+
"deviceName": "Emulator-Api26-Google",
66+
"avd": "Emulator-Api26-Google",
67+
"lt": 60000,
68+
"appActivity": "com.tns.NativeScriptActivity",
69+
"newCommandTimeout": 720,
70+
"noReset": true,
71+
"fullReset": false,
72+
"app": ""
73+
},
74+
"sim.iPhone7.iOS100": {
75+
"platformName": "iOS",
76+
"platformVersion": "10.0",
77+
"deviceName": "iPhone 7 100",
78+
"noReset": true,
79+
"fullReset": false,
80+
"app": ""
81+
},
82+
"sim.iPhone8.iOS110": {
83+
"platformName": "iOS",
84+
"platformVersion": "11.0",
85+
"deviceName": "iPhone 8 110",
86+
"noReset": true,
87+
"fullReset": false,
88+
"app": ""
89+
},
90+
"sim.iPhoneX.iOS110": {
91+
"platformName": "iOS",
92+
"platformVersion": "11.0",
93+
"deviceName": "iPhone X",
94+
"noReset": true,
95+
"fullReset": false,
96+
"app": ""
97+
},
98+
"sim.iPhoneX.iOS111": {
99+
"platformName": "iOS",
100+
"platformVersion": "11.1",
101+
"deviceName": "iPhone X",
102+
"noReset": true,
103+
"fullReset": false,
104+
"app": ""
105+
}
106+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
--timeout 80000
2+
--recursive e2e
3+
--reporter mocha-multi
4+
--reporter-options spec=-,mocha-junit-reporter=test-results.xml

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /