Попытка запустить интеграционные тесты на приложение Angular2 с помощью транспортира:Angular2 транспортир TypeError: this.flow_.getSchedulingFrame_ не является функцией
protractor.conf.js
exports.config = {
baseUrl: 'http://localhost:3000',
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: [
'src/app/e2e/contact.e2e.js'
],
framework: 'jasmine',
useAllAngular2AppRoots: true
};
Мой тестовый файл: contact.e2e.js
describe('App', function(){
it('should render the contact section', function() {
browser.get('/');
expect(true).toBe(true);
});
});
ошибка я получаю:
Message:
Failed: this.flow_.getSchedulingFrame_ is not a function
Stack:
TypeError: this.flow_.getSchedulingFrame_ is not a function
at promise.Promise.addCallback_ (/Users/yarivkatz/Development/workspace/bugeez/bugeez-lp-final/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:651:16)
at promise.Promise.then (/Users/yarivkatz/Development/workspace/bugeez/bugeez-lp-final/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:592:15)
at ManagedPromise.invokeThen_ (/Users/yarivkatz/Development/workspace/bugeez/bugeez-lp-final/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:1193:12)
at ManagedPromise.resolve_ (/Users/yarivkatz/Development/workspace/bugeez/bugeez-lp-final/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:1147:16)
at /Users/yarivkatz/Development/workspace/bugeez/bugeez-lp-final/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:1083:14
at Task.Deferred.fulfill (/Users/yarivkatz/Development/workspace/bugeez/bugeez-lp-final/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:1432:7)
at TaskQueue.onTaskComplete_ (/Users/yarivkatz/Development/workspace/bugeez/bugeez-lp-final/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2995:26)
at subQ.once (/Users/yarivkatz/Development/workspace/bugeez/bugeez-lp-final/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2888:33)
at TaskQueue.emit (/Users/yarivkatz/Development/workspace/bugeez/bugeez-lp-final/node_modules/protractor/node_modules/selenium-webdriver/lib/events.js:64:21)
at TaskQueue.executeNext_ (/Users/yarivkatz/Development/workspace/bugeez/bugeez-lp-final/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2882:12)
From: Task: Run it("should render the contact section") in control flow
at Object.<anonymous> (/Users/yarivkatz/Development/workspace/bugeez/bugeez-lp-final/node_modules/jasminewd2/index.js:79:14)
From asynchronous test:
Error
at Suite.<anonymous> (/Users/yarivkatz/Development/workspace/bugeez/bugeez-lp-final/src/app/e2e/contact.e2e.js:11:3)
at Object.<anonymous> (/Users/yarivkatz/Development/workspace/bugeez/bugeez-lp-final/src/app/e2e/contact.e2e.js:10:1)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
Мой package.json
"dependencies": {
"@angular/common": "~2.2.0",
"@angular/compiler": "~2.2.0",
"@angular/compiler-cli": "~2.2.0",
"@angular/core": "~2.2.0",
"@angular/forms": "~2.2.0",
"@angular/http": "~2.2.0",
"@angular/platform-browser": "~2.2.0",
"@angular/platform-browser-dynamic": "~2.2.0",
"@angular/platform-server": "~2.2.0",
"@angular/router": "~3.2.0",
"@angular/upgrade": "~2.2.0",
"@ngtools/webpack": "^1.1.4",
"angular2-express-engine": "~2.1.0-rc.1",
"angular2-platform-node": "~2.1.0-rc.1",
"angular2-universal": "~2.1.0-rc.1",
"angular2-universal-polyfills": "~2.1.0-rc.1",
"body-parser": "^1.15.2",
"bootstrap": "^3.3.7",
"bootstrap-sass": "^3.3.7",
"csurf": "^1.9.0",
"express": "^4.14.0",
"express-handlebars": "^3.0.0",
"flexslider": "^2.6.3",
"font-awesome": "^4.7.0",
"fs": "0.0.1-security",
"http-proxy": "^1.15.2",
"jquery": "^3.1.1",
"jquery.easing": "^1.4.1",
"jquery.scrollto": "^2.1.2",
"js.clone": "0.0.3",
"methods": "~1.1.2",
"modern-lru": "^1.0.8",
"preboot": "~4.5.2",
"rxjs": "5.0.0-beta.12",
"scrollspy": "^1.5.0",
"velocity": "^0.7.2",
"velocity-animate": "^1.3.1",
"zone.js": "~0.6.26"
},
"devDependencies": {
"@types/body-parser": "0.0.29",
"@types/chai": "^3.4.34",
"@types/compression": "0.0.29",
"@types/cookie-parser": "^1.3.29",
"@types/express": "^4.0.32",
"@types/express-serve-static-core": "^4.0.33",
"@types/hammerjs": "^2.0.32",
"@types/jasmine": "^2.5.38",
"@types/mime": "0.0.28",
"@types/node": "^6.0.38",
"@types/protractor": "^4.0.0",
"@types/selenium-webdriver": "^2.53.35",
"@types/serve-static": "^1.7.27",
"@types/source-map": "^0.5.0",
"angular2-template-loader": "^0.4.0",
"assets-webpack-plugin": "^3.5.0",
"awesome-typescript-loader": "^2.2.4",
"chai": "^3.5.0",
"compression-webpack-plugin": "^0.3.2",
"cookie-parser": "^1.4.3",
"css-loader": "^0.26.0",
"css-to-string-loader": "^0.1.2",
"extract-text-webpack-plugin": "^2.0.0-beta.4",
"file-loader": "^0.9.0",
"html-webpack-plugin": "^2.24.1",
"image-webpack-loader": "^3.0.0",
"imports-loader": "^0.6.5",
"istanbul-instrumenter-loader": "^1.0.0",
"jasmine": "^2.5.2",
"jasmine-core": "^2.5.2",
"jasmine-reporters": "^2.2.0",
"json-loader": "^0.5.4",
"karma": "^1.3.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.0.2",
"karma-jenkins-reporter": "0.0.2",
"karma-mocha": "^1.2.0",
"karma-mocha-reporter": "^2.2.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^1.8.0",
"mocha": "^3.1.2",
"mocha-jenkins-reporter": "^0.3.5",
"mocha-junit-reporter": "^1.12.1",
"node-sass": "^3.13.0",
"nodemon": "^1.10.0",
"protractor": "^4.0.11",
"raw-loader": "^0.5.1",
"resolve-url-loader": "^1.6.0",
"rimraf": "^2.5.4",
"sass-loader": "^4.0.2",
"selenium-webdriver": "^2.47.0",
"sinon": "^1.17.6",
"source-map-loader": "^0.1.5",
"string-replace-loader": "^1.0.5",
"style-loader": "^0.13.1",
"to-string-loader": "^1.1.5",
"ts-helpers": "^1.1.2",
"ts-node": "^1.3.0",
"typescript": "2.0.2",
"url-loader": "^0.5.7",
"v8-lazy-parse-webpack-plugin": "^0.3.0",
"webpack": "2.1.0-beta.27",
"webpack-dev-middleware": "^1.8.4",
"webpack-dev-server": "2.1.0-beta.11",
"webpack-merge": "~0.16.0",
"webpack-s3-plugin": "^0.9.2"
},
Странная вещь, что это происходит только на моем Mac, когда я бегу тестов через грузчиком на моем сервере Дженкинс он работает отлично. Помощь будет очень признательна. Спасибо заранее.
Update
Мой транспортир не является глобальным и версия транспортира, что я бегу это: Версия 4.0.14
Ваш пакет.json не имеет версии Транспортира. Может быть, вы используете глобальную установку Protractor? Кроме того, какая версия Protractor? – cnishina
Извините, что я забыл опубликовать свои зависимостей package.json dev. Транспортир не является глобальным, а версия 4.0.14. –
Так что я до сих пор не вижу версию транспортира в ваших devDependencies. Также вы используете @ types/protractor. Это не требуется, так как Protractor поддерживает TypeScript. Это создается угловым кли? – cnishina