fmsouza / ionic3-seed-protractor Goto Github PK
View Code? Open in Web Editor NEWIonic 3 + Karma + Protractor + Appium
License: Apache License 2.0
Ionic 3 + Karma + Protractor + Appium
License: Apache License 2.0
(node:27402) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[15:32:41] W/driverProviders - Using driver provider hosted, but also found extra driver provider parameter(s): seleniumServerJar
[15:32:41] I/launcher - Running 1 instances of WebDriver
[15:32:41] I/hosted - Using the selenium server at http://127.0.0.1:4723/wd/hub
[15:32:44] E/launcher - An unknown server-side error occurred while processing the command. Original error: Required platform doesn't exist (API level >= 17)
[15:32:44] E/launcher - WebDriverError: An unknown server-side error occurred while processing the command. Original error: Required platform doesn't exist (API level >= 17)
at Object.checkLegacyResponse (/home/ernesto/Downloads/ionic3-seed-protractor-master/node_modules/selenium-webdriver/lib/error.js:546:15)
at parseHttpResponse (/home/ernesto/Downloads/ionic3-seed-protractor-master/node_modules/selenium-webdriver/lib/http.js:509:13)
at doSend.then.response (/home/ernesto/Downloads/ionic3-seed-protractor-master/node_modules/selenium-webdriver/lib/http.js:441:30)
at
at process._tickCallback (internal/process/next_tick.js:160:7)
From: Task: WebDriver.createSession()
at Function.createSession (/home/ernesto/Downloads/ionic3-seed-protractor-master/node_modules/selenium-webdriver/lib/webdriver.js:769:24)
at createDriver (/home/ernesto/Downloads/ionic3-seed-protractor-master/node_modules/selenium-webdriver/index.js:170:33)
at Builder.build (/home/ernesto/Downloads/ionic3-seed-protractor-master/node_modules/selenium-webdriver/index.js:635:14)
at Hosted.getNewDriver (/home/ernesto/Downloads/ionic3-seed-protractor-master/node_modules/protractor/built/driverProviders/driverProvider.js:53:33)
at Runner.createBrowser (/home/ernesto/Downloads/ionic3-seed-protractor-master/node_modules/protractor/built/runner.js:195:43)
at q.then.then (/home/ernesto/Downloads/ionic3-seed-protractor-master/node_modules/protractor/built/runner.js:339:29)
at _fulfilled (/home/ernesto/Downloads/ionic3-seed-protractor-master/node_modules/protractor/node_modules/q/q.js:834:54)
at self.promiseDispatch.done (/home/ernesto/Downloads/ionic3-seed-protractor-master/node_modules/protractor/node_modules/q/q.js:863:30)
at Promise.promise.promiseDispatch (/home/ernesto/Downloads/ionic3-seed-protractor-master/node_modules/protractor/node_modules/q/q.js:796:13)
at /home/ernesto/Downloads/ionic3-seed-protractor-master/node_modules/protractor/node_modules/q/q.js:556:49
[15:32:44] E/launcher - Process exited with error code 199
Hey @fmsouza ,
Do you have any ideia why I'm getting this error when running e2e:
Thanks
throw e;
^
Error: Cannot find module 'tsconfig'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/XXXXX/XXXXXX/XXXXX/SourceCode_ionic_testing/node_modules/ts-node/dist/index.js:23:18)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
I have tsconfig.json file in at /src folder as well as on root folder.
at /src/tsconfi.json
{
"compileOnSave": false,
"compilerOptions": {
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"module": "commonjs",
"moduleResolution": "node",
"outDir": "../dist/out-tsc-e2e",
"sourceMap": true,
"target": "es5",
"typeRoots": [
"../node_modules/@types"
]
}
}```
at root:
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"dom",
"es2015"
],
"module": "es2015",
"moduleResolution": "node",
"sourceMap": true,
"target": "es5",
"baseUrl": "./src",
"paths": {
"@app/env": [
"config/environment"
]
}
},
"include": [
"src//*.ts"
],
"exclude": [
"node_modules",
"src//.spec.ts",
"src/**/tests/.ts"
],
"compileOnSave": false,
"atom": {
"rewriteTsconfig": false
}
}
Please let me know whats wrong I am doing.
I'm interested in a seed like this one. Just followed instructions, installed ionic & cordova, cloned the project and ran npm install. Any subsequent command (start, run android...) fails the same way. It seems like it can't transpile the tests:
[14:38:19] typescript: c:/proyectos/MobileA/src/pages/home/home.e2e.ts, line: 7
Cannot find name 'it'.
L7: it('should have a title saying Home', () => {
L8: browser.getTitle().then(title => {
[14:38:19] typescript: c:/proyectos/MobileA/src/pages/home/home.e2e.ts, line: 9
Cannot find name 'expect'.
L8: browser.getTitle().then(title => {
L9: expect(title).toEqual('Ionic');
L10: });
And it continues for a long list. Do I need to install something else?
Hi @fmsouza ,
When I ran the e2e tests on my Android Emulator, the tests didn't finish.
The command prompt remained stuck at one point.
Here are the files for your reference
apium.capaillities.js
module.exports = { browserName: '', autoWebview: true, platformName: 'android', platformVersion: '8.1.0', deviceName: 'emulator-5554', newCommandTimeout: 60, app: 'path to apk\\android-debug.apk' };
On actual device, tests exit properly & show correct output.
But on Android Emulator, it just remains stuck as per image attached.
Can you please provide steps to run e2e tests on Android emulators ?
Please help.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.