Commit 97171be1 authored by Ward Bell's avatar Ward Bell

chore: testing config tweaks & remove systemjs-polyfill (no longer needed)

parent 5213e619
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
<!-- 1. Load libraries --> <!-- 1. Load libraries -->
<!-- IE required polyfills, in this exact order --> <!-- IE required polyfills, in this exact order -->
<script src="node_modules/es6-shim/es6-shim.min.js"></script> <script src="node_modules/es6-shim/es6-shim.min.js"></script>
<script src="node_modules/systemjs/dist/system-polyfills.js"></script>
<script src="node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script> <script src="node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
<script src="node_modules/angular2/bundles/angular2-polyfills.js"></script> <script src="node_modules/angular2/bundles/angular2-polyfills.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script> <script src="node_modules/systemjs/dist/system.src.js"></script>
<script src="node_modules/rxjs/bundles/Rx.js"></script> <script src="node_modules/rxjs/bundles/Rx.js"></script>
......
...@@ -49,6 +49,8 @@ exports.config = { ...@@ -49,6 +49,8 @@ exports.config = {
// console.log('browser.params:' + JSON.stringify(browser.params)); // console.log('browser.params:' + JSON.stringify(browser.params));
jasmine.getEnv().addReporter(new Reporter( browser.params )) ; jasmine.getEnv().addReporter(new Reporter( browser.params )) ;
global.sendKeys = sendKeys;
// Allow changing bootstrap mode to NG1 for upgrade tests // Allow changing bootstrap mode to NG1 for upgrade tests
global.setProtractorToNg1Mode = function() { global.setProtractorToNg1Mode = function() {
browser.useAllAngular2AppRoots = false; browser.useAllAngular2AppRoots = false;
...@@ -64,14 +66,11 @@ exports.config = { ...@@ -64,14 +66,11 @@ exports.config = {
} }
}; };
// Hack - because of bug with send keys // Hack - because of bug with protractor send keys
function sendKeys(element, str) { function sendKeys(element, str) {
return str.split('').reduce(function (promise, char) { return str.split('').reduce(function (promise, char) {
return promise.then(function () { return promise.resolve(element.sendKeys(char));
return element.sendKeys(char);
});
}, element.getAttribute('value')); }, element.getAttribute('value'));
// better to create a resolved promise here but ... don't know how with protractor;
} }
// Custom reporter // Custom reporter
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment