Skip to content

Dtodorov/add ui tests #6

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 13 commits into from
Feb 28, 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
176 changes: 146 additions & 30 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
env:
global:
- ANDROID_PACKAGE_JS='datetimepicker-debug-js.apk'
- ANDROID_PACKAGE_NG='datetimepicker-debug-ng.apk'
- ANDROID_PACKAGE_VUE='datetimepicker-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"
- IOS_PACKAGE_JS='datetimepicker-demo-js.zip'
- IOS_PACKAGE_NG='datetimepicker-demo-ng.zip'
- IOS_PACKAGE_VUE='datetimepicker-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

branches:
only:
- master
Expand All @@ -12,56 +32,152 @@ matrix:
- cd ../demo && npm run ci.tslint
- cd ../demo-angular && npm run ci.tslint

- stage: "build demos"
- stage: "WebPack and Build"
os: osx
env:
- WebpackiOS="12.0"
- Type="VanillaJS"
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 && 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"
- os: osx
env:
- WebpackiOS="12.0"
- Type="VueJS"
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-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"
- os: osx
env:
- WebpackiOS="12.0"
- 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 && 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"
- language: android
os: linux
env:
- WebpackAndroid="28"
- Type="VanillaJS"
jdk: oraclejdk8
before_install: nvm install 8
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"
- language: android
os: linux
env:
env:
- WebpackAndroid="28"
- Type="VueJS"
jdk: oraclejdk8
before_install: nvm install 8
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"
- language: android
os: linux
env:
- WebpackAndroid="28"
- Type="Angular"
jdk: oraclejdk8
before_install: nvm install 8
script:
- cd src && npm run build
- 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"
language: android
- Type="VanillaJS"
os: linux
jdk: oraclejdk8
before_install: nvm install 8.11.4
script:
script:
- cd src && npm run build
- cd ../demo && tns build android
- language: android
env:
- BuildAndroid="28"
- Type="Angular"
os: linux
jdk: oraclejdk8
before_install: nvm install 8.11.4
script:
- cd src && npm run build
- cd ../demo-angular && tns build android

- os: osx
env:
env:
- BuildiOS="12.0"
- Xcode="10.0"
- Type="VanillaJS"
osx_image: xcode10.0
language: node_js
language: node_js
node_js: "8"
jdk: oraclejdk8
script:
- cd src && npm run build
- cd ../demo && tns build ios
- cd ../demo-angular && tns build ios

- stage: "build demos with webpack"
os: linux
language: android
env:
- Webpack="Android"
jdk: oraclejdk8
before_install: nvm install 8.11.4
script:
before_script: pod repo update
script:
- cd src && npm run build
- cd ../demo && tns build android --bundle --env.uglify --env.snapshot --env.aot
- cd ../demo-angular && tns build android --bundle --env.uglify --env.snapshot --env.aot
- cd ../demo-vue && tns build android --bundle --env.uglify --env.snapshot --env.aot

- cd ../demo && tns build ios --bundle --env.uglify
- os: osx
env:
- Webpack="iOS"
- BuildiOS="12.0"
- Xcode="10.0"
- Type="Angular"
osx_image: xcode10.0
language: node_js
language: node_js
node_js: "8"
jdk: oraclejdk8
script:
before_script: pod repo update
script:
- cd src && npm run build
- cd ../demo && tns build ios --bundle --env.uglify --env.aot
- cd ../demo-angular && tns build ios --bundle --env.uglify --env.aot
- cd ../demo-vue && tns build ios --bundle --env.uglify --env.aot
- 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-angular && npm i
- travis_wait travis_retry npm run e2e -- --runType sim.iPhoneX --sauceLab --appPath $IOS_PACKAGE_NG

android:
components:
Expand Down
129 changes: 129 additions & 0 deletions demo-angular/e2e/config/appium.capabilities.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
{
"android19": {
"platformName": "Android",
"platformVersion": "4.4",
"deviceName": "Emulator-Api19-Default",
"avd": "Emulator-Api19-Default",
"lt": 60000,
"newCommandTimeout": 720,
"noReset": false,
"fullReset": false,
"app": ""
},
"android21": {
"platformName": "Android",
"platformVersion": "5.0",
"deviceName": "Emulator-Api21-Default",
"avd": "Emulator-Api21-Default",
"lt": 60000,
"newCommandTimeout": 720,
"noReset": false,
"fullReset": false,
"app": ""
},
"android23": {
"platformName": "Android",
"platformVersion": "6.0",
"deviceName": "Emulator-Api23-Default",
"avd": "Emulator-Api23-Default",
"lt": 60000,
"newCommandTimeout": 720,
"noReset": false,
"fullReset": false,
"app": ""
},
"android24": {
"platformName": "Android",
"platformVersion": "7.0",
"deviceName": "Android GoogleAPI Emulator",
"lt": 60000,
"newCommandTimeout": 720,
"appium-version": "1.9.1",
"noReset": true,
"fullReset": false,
"app": "",
"idleTimeout": 120,
"automationName": "Appium"
},
"android25": {
"platformName": "Android",
"platformVersion": "7.1",
"deviceName": "Emulator-Api25-Google",
"avd": "Emulator-Api25-Google",
"lt": 60000,
"newCommandTimeout": 720,
"noReset": false,
"fullReset": false,
"app": ""
},
"android26": {
"platformName": "Android",
"platformVersion": "8.0",
"deviceName": "Emulator-Api26-Google",
"avd": "Emulator-Api26-Google",
"lt": 60000,
"newCommandTimeout": 720,
"noReset": false,
"fullReset": false,
"app": ""
},
"android27": {
"platformName": "Android",
"platformVersion": "27",
"deviceName": "Emulator-Api27-Google",
"avd": "Emulator-Api27-Google",
"lt": 60000,
"newCommandTimeout": 720,
"noReset": false,
"fullReset": false,
"app": ""
},
"android28": {
"platformName": "Android",
"platformVersion": "28",
"deviceName": "Emulator-Api28-Google",
"avd": "Emulator-Api28-Google",
"lt": 60000,
"newCommandTimeout": 720,
"noReset": false,
"fullReset": false,
"app": ""
},
"sim.iPhone7": {
"platformName": "iOS",
"platformVersion": "/12.*/",
"deviceName": "iPhone 7",
"noReset": false,
"fullReset": false,
"app": ""
},
"sim.iPhone8": {
"platformName": "iOS",
"platformVersion": "/12*/",
"deviceName": "iPhone 8",
"noReset": false,
"fullReset": false,
"app": ""
},
"sim.iPhoneX": {
"platformName": "iOS",
"platformVersion": "12.0",
"deviceName": "iPhone X",
"appium-version": "1.9.1",
"app": "",
"noReset": true,
"fullReset": false,
"density": 3,
"offsetPixels": 87,
"idleTimeout": 120,
"automationName": "Appium"
},
"sim.iPhoneXS": {
"platformName": "ios",
"platformVersion": "/12*/",
"deviceName": "iPhone XS",
"noReset": false,
"fullReset": false,
"app": ""
}
}
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 999999
--recursive e2e
--reporter mocha-multi
--reporter-options mochawesome=-,mocha-junit-reporter=test-results.xml
--exit
Loading