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

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

parent 5213e619
<html>
<head>
<title>Angular 2 QuickStart</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="styles.css">
<!-- 1. Load libraries -->
<!-- IE required polyfills, in this exact order -->
<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/systemjs/dist/system.src.js"></script>
<script src="node_modules/rxjs/bundles/Rx.js"></script>
......@@ -15,7 +15,7 @@
<!-- 2. Configure SystemJS -->
<script>
System.config({
packages: {
packages: {
app: {
format: 'register',
defaultExtension: 'js'
......
......@@ -49,6 +49,8 @@ exports.config = {
// console.log('browser.params:' + JSON.stringify(browser.params));
jasmine.getEnv().addReporter(new Reporter( browser.params )) ;
global.sendKeys = sendKeys;
// Allow changing bootstrap mode to NG1 for upgrade tests
global.setProtractorToNg1Mode = function() {
browser.useAllAngular2AppRoots = false;
......@@ -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) {
return str.split('').reduce(function (promise, char) {
return promise.then(function () {
return element.sendKeys(char);
});
return promise.resolve(element.sendKeys(char));
}, element.getAttribute('value'));
// better to create a resolved promise here but ... don't know how with protractor;
}
// 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