Skip to content

Commit d9ce8c2

Browse files
committed
fix: appium local
1 parent 4db9837 commit d9ce8c2

12 files changed

+173
-180
lines changed

.travis.yml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,28 @@ git:
1010
depth: 1
1111

1212
branches:
13-
only:
13+
only:
1414
- master
1515

1616
matrix:
1717
include:
1818
- stage: "Unit Tests"
1919
language: node_js
2020
os: linux
21-
node_js: "8"
22-
script: npm i && npm run test
21+
node_js: "11"
22+
script: npm ci && npm run test
2323
- stage: "Build app"
2424
os: osx
2525
env:
2626
- WebpackiOS="12.0"
2727
- Type="VueJS"
2828
osx_image: xcode10.0
2929
language: node_js
30-
node_js: "8"
30+
node_js: "11"
3131
jdk: oraclejdk8
3232
script:
33-
- npm i && npm run prepare:test:app
34-
- cd samples && npm i && tns build ios --bundle --env.uglify --copy-to "./outputs/demo-ns-vue.app"
33+
- npm ci && npm run dev:core
34+
- cd samples && npm i && tns build ios --copy-to "./outputs/nativescript-vue-tests.app"
3535
- cd $IOS_PACKAGE_FOLDER_VUE && zip -r $IOS_PACKAGE_VUE demo-ns-vue.app
3636
- "curl -u $SAUCE_USER:$SAUCE_KEY -X POST -H 'Content-Type: application/octet-stream' $SAUCE_STORAGE/$IOS_PACKAGE_VUE?overwrite=true --data-binary @$IOS_PACKAGE_FOLDER_VUE/$IOS_PACKAGE_VUE"
3737
- language: android
@@ -40,18 +40,18 @@ matrix:
4040
- WebpackAndroid="28"
4141
- Type="VueJS"
4242
jdk: oraclejdk8
43-
before_install: nvm install 8
43+
before_install: nvm install 11
4444
script:
45-
- npm i && npm run prepare:test:app
46-
- cd samples && npm i && tns build android --bundle --env.uglify --copy-to "./outputs/demo-ns-vue.apk"
45+
- npm ci && npm run dev:core
46+
- cd samples && npm i && tns build android --copy-to "./outputs/nativescript-vue-tests.apk"
4747
- "curl -u $SAUCE_USER:$SAUCE_KEY -X POST -H 'Content-Type: application/octet-stream' $SAUCE_STORAGE/$ANDROID_PACKAGE_VUE?overwrite=true --data-binary @$ANDROID_PACKAGE_FOLDER_VUE/$ANDROID_PACKAGE_VUE"
4848
- stage: "UI Tests"
4949
env:
5050
- iOS="12.0"
5151
- Type="VueJS"
5252
language: node_js
5353
os: linux
54-
node_js: "8"
54+
node_js: "11"
5555
script:
5656
- npm i -g appium
5757
- cd samples && npm i
@@ -61,8 +61,7 @@ matrix:
6161
- Android="24"
6262
- Type="VueJS"
6363
language: node_js
64-
os: linux
65-
node_js: "8"
64+
node_js: "11"
6665
script:
6766
- npm i -g appium
6867
- cd samples && npm i
@@ -85,12 +84,12 @@ cache:
8584
- .nvm
8685
- $HOME/.gradle/caches/
8786
- $HOME/.gradle/wrapper/
88-
87+
8988
before_install:
9089
- sudo pip install --upgrade pip
9190
- sudo pip install six
92-
91+
9392
install:
9493
- echo no | npm install -g nativescript
9594
- tns usage-reporting disable
96-
- tns error-reporting disable
95+
- tns error-reporting disable

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
"test": "jest",
1616
"tdd": "jest --watch",
1717
"samples": "node build/sample-runner.js",
18-
"dev": "npm run dev:core & npm run dev:compiler",
19-
"dev:core": "rollup -c build/config.js -w --o dist/index.js --environment TARGET:nativescript-vue",
20-
"dev:compiler": "rollup -c build/config.js -w --environment TARGET:nativescript-vue-template-compiler",
18+
"dev": "npm run dev:core -- -w & npm run dev:compiler -- -w",
19+
"dev:core": "rollup -c build/config.js --o dist/index.js --environment TARGET:nativescript-vue",
20+
"dev:compiler": "rollup -c build/config.js --environment TARGET:nativescript-vue-template-compiler",
2121
"build": "node build/build.js",
2222
"prettier": "prettier --no-semi --single-quote --write \"{{platform,__test__}/**/*.js,samples/app/*.js}\"",
2323
"release": "node build/releaser.js",

samples/app/README.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

samples/app/app-to-check-hmr.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
const Vue = require('nativescript-vue')
2-
const application = require('tns-core-modules/application')
3-
const platform = require('tns-core-modules/platform')
42

53
Vue.config.silent = false
64
Vue.config.debug = true

samples/app/app-with-radsidedrawer-tabs-and-router.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const Vue = require('nativescript-vue')
22
const VueRouter = require('vue-router')
3-
const application = require('tns-core-modules/application')
43

54
Vue.registerElement(
65
'RadSideDrawer',

samples/app/components/VSlot.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ export default {
1717
ComponentWithSlot,
1818
},
1919
}
20-
</script>
20+
</script>

samples/app/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"main": "app-with-radsidedrawer-tabs-and-router.js",
3-
"name": "nativescript-template-tutorial",
2+
"main": "app-to-check-v-slot.js",
3+
"name": "nativescript-vue-tests",
44
"version": "1.0.1"
5-
}
5+
}
Lines changed: 89 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,90 @@
11
{
2-
"android23.local": {
3-
"platformName": "Android",
4-
"platformVersion": "6.0",
5-
"deviceName": "Emulator_Api23_Default",
6-
"avd": "Emulator_Api23_Default",
7-
"noReset": true
8-
},
9-
"android23": {
10-
"platformName": "Android",
11-
"platformVersion": "6.0",
12-
"deviceName": "Android Emulator",
13-
"appium-version": "1.7.1",
14-
"noReset": true
15-
},
16-
"android25": {
17-
"platformName": "Android",
18-
"platformVersion": "7.1",
19-
"deviceName": "Android GoogleAPI Emulator",
20-
"appium-version": "1.7.1",
21-
"noReset": true
22-
},
23-
"android24": {
24-
"platformName": "Android",
25-
"platformVersion": "7.0",
26-
"deviceName": "Android GoogleAPI Emulator",
27-
"appium-version": "1.9.1",
28-
"noReset": true,
29-
"lt": 60000,
30-
"newCommandTimeout": 720,
31-
"fullReset": false,
32-
"idleTimeout": 120,
33-
"automationName": "Appium"
34-
},
35-
"android24.sauce": {
36-
"platformName": "Android",
37-
"platformVersion": "7.0",
38-
"deviceName": "Android GoogleAPI Emulator",
39-
"lt": 60000,
40-
"newCommandTimeout": 720,
41-
"appiumVersion": "1.9.1",
42-
"noReset": true,
43-
"fullReset": false,
44-
"app": "",
45-
"idleTimeout": 120,
46-
"automationName": "Appium"
47-
},
48-
"sim11iPhone6": {
49-
"platformName": "iOS",
50-
"platformVersion": "11.0",
51-
"deviceName": "iPhone 6",
52-
"appium-version": "1.7.1",
53-
"app": ""
54-
},
55-
"sim103iPhone6": {
56-
"browserName": "",
57-
"appium-version": "1.7.1",
58-
"platformName": "iOS",
59-
"platformVersion": "10.3",
60-
"deviceName": "iPhone 6",
61-
"app": ""
62-
},
63-
"sim10iPhone6": {
64-
"platformName": "iOS",
65-
"platformVersion": "10.0",
66-
"deviceName": "iPhone 6",
67-
"appium-version": "1.7.1",
68-
"app": ""
69-
},
70-
"sim12iPhoneX":{
71-
"platformName": "iOS",
72-
"platformVersion": "12.0",
73-
"deviceName": "iPhone X",
74-
"appiumVersion": "1.9.1",
75-
"app": "",
76-
"noReset": true,
77-
"fullReset": false,
78-
"density": 3,
79-
"offsetPixels": 87,
80-
"idleTimeout": 120,
81-
"automationName": "Appium"
82-
}
83-
}
2+
"android28.local": {
3+
"platformName": "Android",
4+
"platformVersion": "9.0",
5+
"deviceName": "Android",
6+
"avd": "android28",
7+
"noReset": true
8+
},
9+
"android23.local": {
10+
"platformName": "Android",
11+
"platformVersion": "6.0",
12+
"deviceName": "Emulator_Api23_Default",
13+
"avd": "Emulator_Api23_Default",
14+
"noReset": true
15+
},
16+
"android23": {
17+
"platformName": "Android",
18+
"platformVersion": "6.0",
19+
"deviceName": "Android Emulator",
20+
"appium-version": "1.7.1",
21+
"noReset": true
22+
},
23+
"android25": {
24+
"platformName": "Android",
25+
"platformVersion": "7.1",
26+
"deviceName": "Android GoogleAPI Emulator",
27+
"appium-version": "1.7.1",
28+
"noReset": true
29+
},
30+
"android24": {
31+
"platformName": "Android",
32+
"platformVersion": "7.0",
33+
"deviceName": "Android GoogleAPI Emulator",
34+
"appium-version": "1.9.1",
35+
"noReset": true,
36+
"lt": 60000,
37+
"newCommandTimeout": 720,
38+
"fullReset": false,
39+
"idleTimeout": 120,
40+
"automationName": "Appium"
41+
},
42+
"android24.sauce": {
43+
"platformName": "Android",
44+
"platformVersion": "7.0",
45+
"deviceName": "Android GoogleAPI Emulator",
46+
"lt": 60000,
47+
"newCommandTimeout": 720,
48+
"appiumVersion": "1.9.1",
49+
"noReset": true,
50+
"fullReset": false,
51+
"app": "",
52+
"idleTimeout": 120,
53+
"automationName": "Appium"
54+
},
55+
"sim11iPhone6": {
56+
"platformName": "iOS",
57+
"platformVersion": "11.0",
58+
"deviceName": "iPhone 6",
59+
"appium-version": "1.7.1",
60+
"app": ""
61+
},
62+
"sim103iPhone6": {
63+
"browserName": "",
64+
"appium-version": "1.7.1",
65+
"platformName": "iOS",
66+
"platformVersion": "10.3",
67+
"deviceName": "iPhone 6",
68+
"app": ""
69+
},
70+
"sim10iPhone6": {
71+
"platformName": "iOS",
72+
"platformVersion": "10.0",
73+
"deviceName": "iPhone 6",
74+
"appium-version": "1.7.1",
75+
"app": ""
76+
},
77+
"sim12iPhoneX": {
78+
"platformName": "iOS",
79+
"platformVersion": "12.0",
80+
"deviceName": "iPhone X",
81+
"appiumVersion": "1.9.1",
82+
"app": "",
83+
"noReset": true,
84+
"fullReset": false,
85+
"density": 3,
86+
"offsetPixels": 87,
87+
"idleTimeout": 120,
88+
"automationName": "Appium"
89+
}
90+
}

samples/e2e/setup.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
const nsAppium = require("nativescript-dev-appium");
1+
const nsAppium = require("nativescript-dev-appium")
22

33
before("start appium server", async () => {
4-
await nsAppium.startServer();
5-
});
4+
await nsAppium.startServer().catch(err => {
5+
console.log(err)
6+
})
7+
})
68

79
after("stop appium server", async () => {
8-
await nsAppium.stopServer();
9-
});
10+
await nsAppium.stopServer().catch(err => {
11+
console.log(err)
12+
})
13+
})

0 commit comments

Comments
 (0)