Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WebDriver configuration example to run angular-seed tests on Windows Phone
diff --git a/karma.conf.js b/karma.conf.js
index 44bb29f..8d47576 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -15,11 +15,28 @@ module.exports = function(config){
frameworks: ['jasmine'],
- browsers : ['Chrome'],
+ hostname: '10.0.1.2',
+
+ browsers: ['MobileIE'],
+ customLaunchers: {
+ 'MobileIE': {
+ base: 'WebDriver',
+ config: {
+ hostname: '10.0.1.3',
+ port: 8080,
+ pathname: ''
+ },
+ browserName: 'internet explorer',
+ platform: 'ANY',
+ name: 'Karma'
+ }
+ },
+
plugins : [
'karma-chrome-launcher',
'karma-firefox-launcher',
+ 'karma-webdriver-launcher',
'karma-jasmine',
'karma-junit-reporter'
],
diff --git a/package.json b/package.json
index e17664c..ad1049a 100644
--- a/package.json
+++ b/package.json
@@ -6,23 +6,23 @@
"repository": "https://github.com/angular/angular-seed",
"license": "MIT",
"devDependencies": {
- "karma": "~0.10",
+ "karma": "~0.12",
"protractor": "^1.1.1",
"http-server": "^0.6.1",
"bower": "^1.3.1",
+ "karma-junit-reporter": "^0.2.2",
"shelljs": "^0.2.6",
- "karma-junit-reporter": "^0.2.2"
+ "karma-webdriver-launcher": "^1.0.1"
},
"scripts": {
"postinstall": "bower install",
"prestart": "npm install",
- "start": "http-server -a localhost -p 8000 -c-1",
+ "start": "http-server -a 0.0.0.0 -p 8000 -c-1",
"pretest": "npm install",
- "test": "karma start karma.conf.js",
- "test-single-run": "karma start karma.conf.js --single-run",
-
+ "test": "node_modules/karma/bin/karma start karma.conf.js",
+ "test-single-run": "node_modules/karma/bin/karma start karma.conf.js --single-run",
"preupdate-webdriver": "npm install",
"update-webdriver": "webdriver-manager update",
diff --git a/e2e-tests/protractor.conf.js b/e2e-tests/protractor.conf.js
index b45a117..733268b 100644
--- a/e2e-tests/protractor.conf.js
+++ b/e2e-tests/protractor.conf.js
@@ -6,10 +6,12 @@ exports.config = {
],
capabilities: {
- 'browserName': 'chrome'
+ 'browserName': 'internet explorer'
},
- baseUrl: 'http://localhost:8000/app/',
+ baseUrl: 'http://10.0.1.2:8000/app/',
+ seleniumAddress: 'http://10.0.1.3:8080',
+ chromeOnly: false,
framework: 'jasmine',
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment