diff options
author | Johann-S <johann.servoire@gmail.com> | 2018-08-01 11:11:10 +0300 |
---|---|---|
committer | Johann-S <johann.servoire@gmail.com> | 2018-08-30 23:17:15 +0300 |
commit | 54d86e6249d90fa8634acd3bc0b78556269edce5 (patch) | |
tree | 2bdd488b52c0f28569b5da377bdf9a4c1cd115da /js | |
parent | 2f5f8ef755395c1c3bb1663bf22caf93d74738fc (diff) |
move away from sauce labs to browserstack
Diffstat (limited to 'js')
-rw-r--r-- | js/tests/browsers.js | 82 | ||||
-rw-r--r-- | js/tests/karma-browserstack.conf.js | 51 |
2 files changed, 133 insertions, 0 deletions
diff --git a/js/tests/browsers.js b/js/tests/browsers.js new file mode 100644 index 0000000000..da36e497b9 --- /dev/null +++ b/js/tests/browsers.js @@ -0,0 +1,82 @@ +/* eslint-env node */ +/* eslint-disable camelcase */ + +const browsers = { + safariMac: { + base: 'BrowserStack', + os: 'OS X', + os_version: 'High Sierra', + browser: 'Safari', + browser_version: 'latest' + }, + chromeMac: { + base: 'BrowserStack', + os: 'OS X', + os_version: 'High Sierra', + browser : 'Chrome', + browser_version : 'latest' + }, + firefoxMac: { + base: 'BrowserStack', + os: 'OS X', + os_version: 'High Sierra', + browser: 'Firefox', + browser_version: 'latest' + }, + edgeWin10: { + base: 'BrowserStack', + os: 'Windows', + os_version: '10', + browser: 'Edge', + browser_version: 'latest' + }, + ie11Win10: { + base: 'BrowserStack', + os: 'Windows', + os_version: '10', + browser: 'IE', + browser_version: '11.0' + }, + chromeWin10: { + base: 'BrowserStack', + os: 'Windows', + os_version: '10', + browser: 'Chrome', + browser_version: 'latest' + }, + firefoxWin10: { + base: 'BrowserStack', + os: 'Windows', + os_version: '10', + browser: 'Firefox', + browser_version: 'latest' + }, + ie10Win8: { + base: 'BrowserStack', + os: 'Windows', + os_version: '8', + browser: 'IE', + browser_version: '10.0' + }, + iphoneX: { + base: 'BrowserStack', + os: 'ios', + os_version: '11.0', + device: 'iPhone X', + real_mobile: true + }, + pixel2: { + base: 'BrowserStack', + os: 'android', + os_version: '8.0', + device: 'Google Pixel 2', + real_mobile: true + } +} + +const browsersKeys = Object.keys(browsers) + +module.exports = { + browsers, + browsersKeys +} diff --git a/js/tests/karma-browserstack.conf.js b/js/tests/karma-browserstack.conf.js new file mode 100644 index 0000000000..a4408183d0 --- /dev/null +++ b/js/tests/karma-browserstack.conf.js @@ -0,0 +1,51 @@ +/* eslint-env node */ +/* eslint no-process-env: 0 */ +const ip = require('ip') +const { + browsers, + browsersKeys +} = require('./browsers') + +module.exports = (config) => { + config.set({ + hostname: ip.address(), + browserStack: { + username: process.env.BROWSER_STACK_USERNAME, + accessKey: process.env.BROWSER_STACK_ACCESS_KEY, + build: `bootstrap-${new Date().toISOString()}`, + project: 'Bootstrap', + retryLimit: 2 + }, + basePath: '../..', + frameworks: ['qunit', 'sinon'], + plugins: [ + 'karma-qunit', + 'karma-sinon', + 'karma-browserstack-launcher' + ], + // list of files / patterns to load in the browser + files: [ + 'site/docs/4.1/assets/js/vendor/jquery-slim.min.js', + 'site/docs/4.1/assets/js/vendor/popper.min.js', + 'js/coverage/dist/util.js', + 'js/coverage/dist/tooltip.js', + 'js/coverage/dist/!(util|index|tooltip).js', // include all of our js/dist files except util.js, index.js and tooltip.js + 'js/tests/unit/*.js' + ], + customLaunchers: browsers, + browsers: browsersKeys, + reporters: ['dots', 'BrowserStack'], + port: 9876, + colors: true, + // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG + logLevel: config.LOG_ERROR || config.LOG_WARN, + autoWatch: false, + singleRun: true, + concurrency: Infinity, + client: { + qunit: { + showUI: true + } + } + }) +} |