2016-10-04 23:39:20 -04:00
|
|
|
/**
|
|
|
|
* @license
|
|
|
|
* Copyright Google Inc. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
|
|
* found in the LICENSE file at https://angular.io/license
|
|
|
|
*/
|
|
|
|
|
2015-05-20 17:17:09 -04:00
|
|
|
/**
|
|
|
|
* Patch Protractor so that it uses ChromeDriver 2.14 instead of 2.15.
|
|
|
|
*
|
|
|
|
* This is necessary because as of v2.1.0, Protractor by default uses
|
|
|
|
* chromedriver 2.15. However, angular need to test against Dartium, which
|
|
|
|
* is an old version of Chromium which is incompatible with Chromedriver > 2.14.
|
|
|
|
*
|
|
|
|
* TODO(juliemr): Remove this script once Dartium has been updated.
|
|
|
|
*/
|
|
|
|
var fs = require('fs');
|
|
|
|
var path = require('path');
|
|
|
|
|
|
|
|
var protractorConfigFile = path.resolve(require.resolve('protractor'), '../../config.json');
|
|
|
|
|
|
|
|
var newConfig = {
|
2016-10-04 23:39:20 -04:00
|
|
|
'webdriverVersions': {
|
|
|
|
'selenium': '2.45.0',
|
|
|
|
'chromedriver': '2.14',
|
|
|
|
'iedriver': '2.45.0',
|
2015-05-20 17:17:09 -04:00
|
|
|
}
|
2016-10-04 23:39:20 -04:00
|
|
|
};
|
2015-05-20 17:17:09 -04:00
|
|
|
|
2016-10-04 23:39:20 -04:00
|
|
|
fs.writeFile(protractorConfigFile, JSON.stringify(newConfig));
|