Skip to content

Zbranzov/tests #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,7 @@ demo-vue/platforms/
/src/*.tgz
/publish/package/*.tgz
/publish/package/**/*
/publish/src/**/*
/publish/src/**/*
test-results.xml
**/reports/**/*
**/mochawesome-report/**/*
135 changes: 74 additions & 61 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@ env:
- ANDROID_PACKAGE_JS='picker-debug-js.apk'
- ANDROID_PACKAGE_NG='picker-debug-ng.apk'
- ANDROID_PACKAGE_VUE='picker-debug-vue.apk'
- ANDROID_PACKAGE_FOLDER_JS=$TRAVIS_BUILD_DIR/demo/outputs
- ANDROID_PACKAGE_FOLDER_NG=$TRAVIS_BUILD_DIR/demo-angular/outputs
- ANDROID_PACKAGE_FOLDER_VUE=$TRAVIS_BUILD_DIR/demo-vue/outputs
- ANDROID_SAUCE_STORAGE="https://saucelabs.com/rest/v1/storage/$SAUCE_USER"
- PACKAGE_FOLDER_JS=$TRAVIS_BUILD_DIR/demo/outputs
- PACKAGE_FOLDER_NG=$TRAVIS_BUILD_DIR/demo-angular/outputs
- PACKAGE_FOLDER_VUE=$TRAVIS_BUILD_DIR/demo-vue/outputs
- SAUCE_STORAGE="https://saucelabs.com/rest/v1/storage/$SAUCE_USER"
- IOS_PACKAGE_JS='picker-demo-js.zip'
- IOS_PACKAGE_NG='picker-demo-ng.zip'
- IOS_PACKAGE_VUE='picker-demo-vue.zip'
- IOS_PACKAGE_FOLDER_JS=$TRAVIS_BUILD_DIR/demo/outputs
- IOS_PACKAGE_FOLDER_NG=$TRAVIS_BUILD_DIR/demo-angular/outputs
- IOS_PACKAGE_FOLDER_VUE=$TRAVIS_BUILD_DIR/demo-vue/outputs
- IOS_SAUCE_STORAGE="https://saucelabs.com/rest/v1/storage/$SAUCE_USER"

git:
depth: 1
Expand All @@ -28,9 +24,7 @@ matrix:
os: linux
node_js: "8"
script:
- cd src && npm run ci.tslint
- cd ../demo && npm run ci.tslint
- cd ../demo-angular && npm run ci.tslint
- cd src && npm i && npm run tslint

- stage: "WebPack and Build"
os: osx
Expand All @@ -45,8 +39,8 @@ matrix:
script:
- cd src && npm run build
- cd ../demo && npm i && tns build ios --bundle --env.uglify --copy-to "./outputs/demo.app"
- cd $IOS_PACKAGE_FOLDER_JS && zip -r $IOS_PACKAGE_JS demo.app
- "curl -u $SAUCE_USER:$SAUCE_KEY -X POST -H 'Content-Type: application/octet-stream' $IOS_SAUCE_STORAGE/$IOS_PACKAGE_JS?overwrite=true --data-binary @$IOS_PACKAGE_FOLDER_JS/$IOS_PACKAGE_JS"
- cd $PACKAGE_FOLDER_JS && zip -r $IOS_PACKAGE_JS demo.app
- "curl -u $SAUCE_USER:$SAUCE_KEY -X POST -H 'Content-Type: application/octet-stream' $SAUCE_STORAGE/$IOS_PACKAGE_JS?overwrite=true --data-binary @$PACKAGE_FOLDER_JS/$IOS_PACKAGE_JS"
- os: osx
env:
- WebpackiOS="12.0"
Expand All @@ -59,8 +53,8 @@ matrix:
script:
- cd src && npm run build
- cd ../demo-vue && npm i && tns build ios --bundle --env.uglify --copy-to "./outputs/demovue.app"
- cd $IOS_PACKAGE_FOLDER_VUE && zip -r $IOS_PACKAGE_VUE demovue.app
- "curl -u $SAUCE_USER:$SAUCE_KEY -X POST -H 'Content-Type: application/octet-stream' $IOS_SAUCE_STORAGE/$IOS_PACKAGE_VUE?overwrite=true --data-binary @$IOS_PACKAGE_FOLDER_VUE/$IOS_PACKAGE_VUE"
- cd $PACKAGE_FOLDER_VUE && zip -r $IOS_PACKAGE_VUE demovue.app
- "curl -u $SAUCE_USER:$SAUCE_KEY -X POST -H 'Content-Type: application/octet-stream' $SAUCE_STORAGE/$IOS_PACKAGE_VUE?overwrite=true --data-binary @$PACKAGE_FOLDER_VUE/$IOS_PACKAGE_VUE"
- os: osx
env:
- WebpackiOS="12.0"
Expand All @@ -74,8 +68,8 @@ matrix:
- cd src && npm run build && npm pack
- cd ../demo-angular && tns plugin add ../src/*.tgz
- npm i && tns build ios --bundle --env.uglify --env.aot --copy-to "./outputs/demoangular.app"
- cd $IOS_PACKAGE_FOLDER_NG && zip -r $IOS_PACKAGE_NG demoangular.app
- "curl -u $SAUCE_USER:$SAUCE_KEY -X POST -H 'Content-Type: application/octet-stream' $IOS_SAUCE_STORAGE/$IOS_PACKAGE_NG?overwrite=true --data-binary @$IOS_PACKAGE_FOLDER_NG/$IOS_PACKAGE_NG"
- cd $PACKAGE_FOLDER_NG && zip -r $IOS_PACKAGE_NG demoangular.app
- "curl -u $SAUCE_USER:$SAUCE_KEY -X POST -H 'Content-Type: application/octet-stream' $SAUCE_STORAGE/$IOS_PACKAGE_NG?overwrite=true --data-binary @$PACKAGE_FOLDER_NG/$IOS_PACKAGE_NG"
- language: android
os: linux
env:
Expand All @@ -86,7 +80,7 @@ matrix:
script:
- cd src && npm run build
- cd ../demo && npm i && tns build android --bundle --env.uglify --env.snapshot --copy-to "./outputs/app-debug.apk"
- "curl -u $SAUCE_USER:$SAUCE_KEY -X POST -H 'Content-Type: application/octet-stream' $ANDROID_SAUCE_STORAGE/$ANDROID_PACKAGE_JS?overwrite=true --data-binary @$ANDROID_PACKAGE_FOLDER_JS/app-debug.apk"
- "curl -u $SAUCE_USER:$SAUCE_KEY -X POST -H 'Content-Type: application/octet-stream' $SAUCE_STORAGE/$ANDROID_PACKAGE_JS?overwrite=true --data-binary @$PACKAGE_FOLDER_JS/app-debug.apk"
- language: android
os: linux
env:
Expand All @@ -97,7 +91,7 @@ matrix:
script:
- cd src && npm run build
- cd ../demo-vue && npm i && tns build android --bundle --env.uglify --copy-to "./outputs/app-debug.apk"
- "curl -u $SAUCE_USER:$SAUCE_KEY -X POST -H 'Content-Type: application/octet-stream' $ANDROID_SAUCE_STORAGE/$ANDROID_PACKAGE_VUE?overwrite=true --data-binary @$ANDROID_PACKAGE_FOLDER_VUE/app-debug.apk"
- "curl -u $SAUCE_USER:$SAUCE_KEY -X POST -H 'Content-Type: application/octet-stream' $SAUCE_STORAGE/$ANDROID_PACKAGE_VUE?overwrite=true --data-binary @$PACKAGE_FOLDER_VUE/app-debug.apk"
- language: android
os: linux
env:
Expand All @@ -110,17 +104,7 @@ matrix:
- cd ../publish && sh pack.sh
- cd ../demo-angular && tns plugin add ../publish/package/*.tgz
- npm i && tns build android --bundle --env.uglify --env.snapshot --env.aot --copy-to "./outputs/app-debug.apk"
- "curl -u $SAUCE_USER:$SAUCE_KEY -X POST -H 'Content-Type: application/octet-stream' $ANDROID_SAUCE_STORAGE/$ANDROID_PACKAGE_NG?overwrite=true --data-binary @$ANDROID_PACKAGE_FOLDER_NG/app-debug.apk"
- language: android
env:
- BuildAndroid="28"
- Type="VanillaJS"
os: linux
jdk: oraclejdk8
before_install: nvm install 8.11.4
script:
- cd src && npm run build
- cd ../demo && tns build android
- "curl -u $SAUCE_USER:$SAUCE_KEY -X POST -H 'Content-Type: application/octet-stream' $SAUCE_STORAGE/$ANDROID_PACKAGE_NG?overwrite=true --data-binary @$PACKAGE_FOLDER_NG/app-debug.apk"
- language: android
env:
- BuildAndroid="28"
Expand All @@ -135,49 +119,78 @@ matrix:
env:
- BuildiOS="12.0"
- Xcode="10.0"
- Type="VanillaJS"
- Type="Angular"
osx_image: xcode10.0
language: node_js
node_js: "8"
jdk: oraclejdk8
before_script: pod repo update
script:
- cd src && npm run build
- cd ../demo && tns build ios --bundle --env.uglify
- os: osx
- cd ../demo-angular && tns build ios
- stage: "UI Tests"
env:
- BuildiOS="12.0"
- Xcode="10.0"
- Android="24"
- Type="Angular"
osx_image: xcode10.0
language: node_js
os: linux
node_js: "8"
jdk: oraclejdk8
before_script: pod repo update
script:
- cd src && npm run build
- cd ../demo-angular && tns build ios
# - stage: "UI Tests"
# env:
# - Android="24"
# - Type="Angular"
# language: node_js
# os: linux
# node_js: "8"
# script:
# - npm i -g appium
# - cd demo-angular && npm i
# - travis_wait travis_retry npm run e2e -- --runType android24 --sauceLab --appPath $ANDROID_PACKAGE_NG
# - os: linux
# env:
# - iOS="12.0"
# - Type="Angular"
# language: node_js
# node_js: "8"
# script:
# - npm i -g appium
# - cd demo-ng && npm i
# - travis_wait travis_retry npm run e2e -- --runType sim.iPhoneX --sauceLab --appPath $IOS_PACKAGE_NG
- npm i -g appium
- cd demo-angular && npm i
- travis_wait travis_retry npm run e2e -- --runType android24.sauce --sauceLab --appPath $ANDROID_PACKAGE_NG
- os: linux
env:
- iOS="12.0"
- Type="Angular"
language: node_js
node_js: "8"
script:
- npm i -g appium
- cd demo-angular && npm i
- travis_wait travis_retry npm run e2e -- --runType sim.iPhoneX.ios12.sauce --sauceLab --appPath $IOS_PACKAGE_NG
- os: linux
env:
- Android="24"
- Type="VueJS"
language: node_js
os: linux
node_js: "8"
script:
- npm i -g appium
- cd demo-vue && npm i
- travis_wait travis_retry npm run e2e -- --runType android24.sauce --sauceLab --appPath $ANDROID_PACKAGE_VUE
- os: linux
env:
- iOS="12.0"
- Type="VueJS"
language: node_js
node_js: "8"
script:
- npm i -g appium
- cd demo-vue && npm i
- travis_wait travis_retry npm run e2e -- --runType sim.iPhoneX.ios12.sauce --sauceLab --appPath $IOS_PACKAGE_VUE
- os: linux
env:
- Android="24"
- Type="VanillaJS"
language: node_js
os: linux
node_js: "8"
script:
- npm i -g appium
- cd demo && npm i
- travis_wait travis_retry npm run e2e -- --runType android24.sauce --sauceLab --appPath $ANDROID_PACKAGE_JS
- os: linux
env:
- iOS="12.0"
- Type="VanillaJS"
language: node_js
node_js: "8"
script:
- npm i -g appium
- cd demo && npm i
- travis_wait travis_retry npm run e2e -- --runType sim.iPhoneX.ios12.sauce --sauceLab --appPath $IOS_PACKAGE_JS

android:
components:
Expand Down
123 changes: 123 additions & 0 deletions demo-angular/e2e/config/appium.capabilities.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
{
"android23": {
"platformName": "Android",
"platformVersion": "6.0",
"deviceName": "Android",
"lt": 60000,
"appActivity": "com.tns.NativeScriptActivity",
"newCommandTimeout": 720,
"noReset": true,
"fullReset": false,
"app": ""
},
"android24": {
"platformName": "Android",
"platformVersion": "7.0",
"deviceName": "Emulator-Api24-Google",
"avd":"Emulator-Api24-Google",
"lt": 60000,
"newCommandTimeout": 720,
"appium-version": "1.8.1",
"appActivity": "com.tns.NativeScriptActivity",
"noReset": true,
"fullReset": false,
"app": "",
"automationName": "Appium",
"density": 3.2,
"offsetPixels": 51
},
"android24.sauce": {
"platformName": "Android",
"platformVersion": "7.0",
"deviceName": "Android GoogleAPI Emulator",
"lt": 60000,
"newCommandTimeout": 720,
"appiumVersion": "1.9.1",
"noReset": true,
"fullReset": false,
"app": "",
"idleTimeout": 120,
"automationName": "Appium"
},
"android25": {
"platformName": "Android",
"platformVersion": "7.1",
"deviceName": "Google Pixel GoogleAPI",
"lt": 60000,
"appActivity": "com.tns.NativeScriptActivity",
"newCommandTimeout": 720,
"noReset": true,
"fullReset": false,
"app": ""
},
"android27": {
"platformName": "Android",
"platformVersion": "8.1",
"deviceName": "Emulator-Api27-Google",
"lt": 60000,
"appActivity": "com.tns.NativeScriptActivity",
"newCommandTimeout": 720,
"noReset": true,
"fullReset": false,
"app": ""
},
"sim.iPhoneX.iOS112": {
"platformName": "iOS",
"platformVersion": "11.2",
"deviceName": "iPhone X",
"appium-version": "1.8.0",
"density": 3,
"offsetPixels": 87,
"noReset": true,
"fullReset": false,
"app": ""
},
"sim.iPhoneX.iOS113": {
"platformName": "iOS",
"platformVersion": "11.3",
"deviceName": "iPhone X",
"appium-version": "1.8.0",
"density": 3,
"offsetPixels": 87,
"noReset": true,
"fullReset": false,
"app": ""
},
"sim.iPhoneX.ios11": {
"platformName": "iOS",
"platformVersion": "11.2",
"deviceName": "iPhone X",
"appium-version": "1.8.1",
"noReset": true,
"fullReset": false,
"app": "",
"idleTimeout": 120,
"automationName": "Appium"
},
"sim.iPhoneX.ios12": {
"platformName": "iOS",
"platformVersion": "12.1",
"deviceName": "iPhone X",
"appiumVersion": "1.9.1",
"noReset": true,
"fullReset": false,
"density": 3,
"offsetPixels": 87,
"app": "",
"idleTimeout": 120,
"automationName": "Appium"
},
"sim.iPhoneX.ios12.sauce": {
"platformName": "iOS",
"platformVersion": "12.0",
"deviceName": "iPhone X",
"appium-version": "1.9.1",
"noReset": true,
"fullReset": false,
"density": 3,
"offsetPixels": 87,
"app": "",
"idleTimeout": 120,
"automationName": "Appium"
}
}
5 changes: 5 additions & 0 deletions demo-angular/e2e/config/mocha.opts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
--timeout 250000
--recursive e2e
--reporter mocha-multi
--reporter-options mochawesome=-,mocha-junit-reporter=test-results.xml
--exit
Loading