// Sauce configuration, based on the one in zone.js: https://github.com/angular/zone.js/blob/master/sauce.conf.js

module.exports = function (config) {

  var customLaunchers = {
    'SL_Chrome': {
      base: 'SauceLabs',
      browserName: 'chrome',
      version: '42'
    },
    'SL_ChromeBeta': {
      base: 'SauceLabs',
      browserName: 'chrome',
      version: 'beta'
    },
    'SL_Firefox': {
      base: 'SauceLabs',
      browserName: 'firefox',
      version: '37'
    },
    'SL_Safari7': {
      base: 'SauceLabs',
      browserName: 'safari',
      platform: 'OS X 10.9',
      version: '7'
    },
    'SL_Safari8': {
      base: 'SauceLabs',
      browserName: 'safari',
      platform: 'OS X 10.10',
      version: '8'
    },
    'SL_IE_9': {
      base: 'SauceLabs',
      browserName: 'internet explorer',
      platform: 'Windows 2008',
      version: '9'
    },
    'SL_IE_10': {
      base: 'SauceLabs',
      browserName: 'internet explorer',
      platform: 'Windows 2012',
      version: '10'
    },
    'SL_IE_11': {
      base: 'SauceLabs',
      browserName: 'internet explorer',
      platform: 'Windows 8.1',
      version: '11'
    }
  };

  config.set({
    captureTimeout: 120000,
    browserNoActivityTimeout: 1500000,

    sauceLabs: {
      testName: 'pow-core',
      startConnect: false,
      recordVideo: false,
      recordScreenshots: false,
      options:  {
          'selenium-version': '2.45.0',
          'command-timeout': 600,
          'idle-timeout': 600,
          'max-duration': 5400
      }
    },

    customLaunchers: customLaunchers,

    browsers: Object.keys(customLaunchers),

    reporters: ['dots', 'saucelabs', 'coverage'],

    singleRun: true,

    plugins: [
      'karma-*'
    ]
  });

  if (process.env.TRAVIS) {
    config.sauceLabs.build = 'TRAVIS #' + process.env.TRAVIS_BUILD_NUMBER + ' (' + process.env.TRAVIS_BUILD_ID + ')';
    config.sauceLabs.tunnelIdentifier = process.env.TRAVIS_JOB_NUMBER;
  }
};

@@ -172,24 +172,26 @@
 ers = %7B%0A    
+//
 'SL_Chrome':
@@ -189,32 +189,34 @@
 _Chrome': %7B%0A    
+//
   base: 'SauceLa
@@ -216,32 +216,34 @@
 SauceLabs',%0A    
+//
   browserName: '
@@ -247,32 +247,34 @@
 : 'chrome',%0A    
+//
   version: '42'%0A
@@ -273,31 +273,35 @@
 n: '42'%0A    
+//
 %7D,%0A    
+//
 'SL_ChromeBe
@@ -303,32 +303,34 @@
 omeBeta': %7B%0A    
+//
   base: 'SauceLa
@@ -330,32 +330,34 @@
 SauceLabs',%0A    
+//
   browserName: '
@@ -365,24 +365,26 @@
 hrome',%0A    
+//
   version: '
@@ -389,31 +389,35 @@
  'beta'%0A    
+//
 %7D,%0A    
+//
 'SL_Firefox'
@@ -416,32 +416,34 @@
 Firefox': %7B%0A    
+//
   base: 'SauceLa
@@ -443,32 +443,34 @@
 SauceLabs',%0A    
+//
   browserName: '
@@ -479,24 +479,26 @@
 refox',%0A    
+//
   version: '
@@ -501,31 +501,35 @@
 n: '37'%0A    
+//
 %7D,%0A    
+//
 'SL_Safari7'
@@ -528,32 +528,34 @@
 Safari7': %7B%0A    
+//
   base: 'SauceLa
@@ -555,32 +555,34 @@
 SauceLabs',%0A    
+//
   browserName: '
@@ -586,32 +586,34 @@
 : 'safari',%0A    
+//
   platform: 'OS 
@@ -621,24 +621,26 @@
  10.9',%0A    
+//
   version: '
@@ -642,31 +642,35 @@
 on: '7'%0A    
+//
 %7D,%0A    
+//
 'SL_Safari8'
@@ -669,32 +669,34 @@
 Safari8': %7B%0A    
+//
   base: 'SauceLa
@@ -696,32 +696,34 @@
 SauceLabs',%0A    
+//
   browserName: '
@@ -731,24 +731,26 @@
 afari',%0A    
+//
   platform: 
@@ -763,24 +763,26 @@
 10.10',%0A    
+//
   version: '
@@ -784,24 +784,26 @@
 on: '8'%0A    
+//
 %7D,%0A    'SL_I
@@ -904,12 +904,9 @@
 ows 
-2008
+7
 ',%0A 
@@ -1042,12 +1042,9 @@
 ows 
-2012
+8
 ',%0A 

isolate just the ie tests for fixing