I'm working at an Angular (v.4) project and using Protractor I bumped into this issue
From the terminal:
I/launcher - Running 1 instances of WebDriver
I/hosted - Using the selenium server at http://localhost:4444/wd/hub Started No specs found Finished in 0.003 seconds
I/launcher - 0 instance(s) of WebDriver still running [17:06:38] I/launcher - chrome #01 passed
It runs the browser which get closed quickly, and it doesn't run (find) any spec.
protractor.conf.js:
require('ts-node/register');
var helpers = require('./helpers');
exports.config = {
baseUrl: 'http://localhost:3000/',
// use `npm run e2e`
specs: [
helpers.root('test/e2e/**/**.e2e.ts'),
helpers.root('test/e2e/**/*.e2e.ts')
],
exclude: [],
framework: 'jasmine2',
allScriptsTimeout: 110000,
jasmineNodeOpts: {
showTiming: true,
showColors: true,
isVerbose: false,
includeStackTrace: false,
defaultTimeoutInterval: 400000
},
directConnect: true,
capabilities: {
browserName: 'chrome',
chromeOptions: {
args: ["--headless", "--disable-gpu", "--window-size=800x600"]
}
},
onPrepare: function () {
browser.ignoreSynchronization = true;
},
/**
* Angular 2 configuration
*
* useAllAngular2AppRoots: tells Protractor to wait for any angular2 apps on the page instead of just the one matching
* `rootEl`
*/
useAllAngular2AppRoots: true
};
Folder structure
-/App
|--/config
|--protractor.conf.js
|--helpers.js
|--(all webpack files)
|--(other stuff)
|--/node_modules
|--/src
|--/test
|--/e2e
|-mytest.e2e.ts
|--/features
|--/mockBackend
|--/pages
|-mypage.page.ts
|--config.js
package.json
"cucumber": "^2",
"cucumber-html-reporter": "^3.0.4",
"cucumber-snippets-tsflow": "^1.0.2",
"cucumber-tsflow": "^2.2.0",
"protractor": "^5.1.2",
"protractor-cucumber-framework": "^3",
"protractor-snapshot": "^1.2.0",
../test/e2e/**/*.e2e.ts
withouthelpers.root
does not work?? – Gundersone2e
, any different with../test/e2e/*.e2e.ts
?. Deleted above comments to make room for these – Gunderson