2016-10-05 03:39:20 +00:00
|
|
|
/**
|
|
|
|
|
* @license
|
2020-05-19 19:08:49 +00:00
|
|
|
* Copyright Google LLC All Rights Reserved.
|
2016-10-05 03:39:20 +00:00
|
|
|
*
|
|
|
|
|
* 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
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
// Unique place to configure the browsers which are used in the different CI jobs in Sauce Labs (SL)
|
2015-12-10 13:40:00 +00:00
|
|
|
// If the target is set to null, then the browser is not run anywhere during CI.
|
2016-10-05 03:39:20 +00:00
|
|
|
// If a category becomes empty (e.g. BS and required), then the corresponding job must be commented
|
2019-01-08 11:41:24 +00:00
|
|
|
// out in the CI configuration.
|
2021-11-25 19:07:49 +00:00
|
|
|
const config = {
|
|
|
|
|
'Android11': {unitTest: {target: 'SL', required: true}},
|
2022-05-08 21:38:17 +00:00
|
|
|
'Android12': {unitTest: {target: 'SL', required: true}},
|
2015-12-10 13:40:00 +00:00
|
|
|
};
|
|
|
|
|
|
2021-11-25 19:07:49 +00:00
|
|
|
/** Whether browsers should be remotely acquired in debug mode. */
|
|
|
|
|
const debugMode = false;
|
|
|
|
|
|
2022-05-08 21:38:17 +00:00
|
|
|
// Specific platform configuration can be found at:
|
|
|
|
|
// https://saucelabs.com/platform/platform-configurator
|
2021-11-25 19:07:49 +00:00
|
|
|
const customLaunchers = {
|
2022-05-08 21:38:17 +00:00
|
|
|
'SL_ANDROID11': {
|
2020-02-06 23:50:14 +00:00
|
|
|
base: 'SauceLabs',
|
|
|
|
|
browserName: 'Chrome',
|
2021-11-25 19:07:49 +00:00
|
|
|
platformName: 'Android',
|
2022-05-08 21:38:17 +00:00
|
|
|
platformVersion: '11.0',
|
2021-11-25 19:07:49 +00:00
|
|
|
deviceName: 'Google Pixel 3a GoogleAPI Emulator',
|
|
|
|
|
appiumVersion: '1.20.2',
|
|
|
|
|
extendedDebugging: debugMode,
|
2020-02-06 23:50:14 +00:00
|
|
|
},
|
2022-05-08 21:38:17 +00:00
|
|
|
'SL_ANDROID12': {
|
2020-02-06 23:50:14 +00:00
|
|
|
base: 'SauceLabs',
|
|
|
|
|
browserName: 'Chrome',
|
2021-11-25 19:07:49 +00:00
|
|
|
platformName: 'Android',
|
2022-05-08 21:38:17 +00:00
|
|
|
platformVersion: '12.0',
|
|
|
|
|
deviceName: 'Google Pixel 4a (5G) GoogleAPI Emulator',
|
|
|
|
|
appiumVersion: '1.22.1',
|
2021-11-25 19:07:49 +00:00
|
|
|
extendedDebugging: debugMode,
|
2020-02-06 23:50:14 +00:00
|
|
|
},
|
2015-06-02 14:29:09 +00:00
|
|
|
};
|
|
|
|
|
|
2021-11-25 19:07:49 +00:00
|
|
|
const sauceAliases = {
|
2015-12-10 13:40:00 +00:00
|
|
|
'CI_REQUIRED': buildConfiguration('unitTest', 'SL', true),
|
|
|
|
|
'CI_OPTIONAL': buildConfiguration('unitTest', 'SL', false)
|
2015-06-02 14:29:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
module.exports = {
|
2022-05-08 21:38:17 +00:00
|
|
|
customLaunchers : customLaunchers,
|
|
|
|
|
sauceAliases : sauceAliases,
|
2016-04-29 00:50:03 +00:00
|
|
|
};
|
2015-12-10 13:40:00 +00:00
|
|
|
|
|
|
|
|
function buildConfiguration(type, target, required) {
|
2021-11-25 19:07:49 +00:00
|
|
|
return Object.keys(config)
|
2016-10-05 03:39:20 +00:00
|
|
|
.filter((item) => {
|
2021-11-25 19:07:49 +00:00
|
|
|
const conf = config[item][type];
|
2016-10-05 03:39:20 +00:00
|
|
|
return conf.required === required && conf.target === target;
|
|
|
|
|
})
|
|
|
|
|
.map((item) => target + '_' + item.toUpperCase());
|
2015-12-10 13:40:00 +00:00
|
|
|
}
|