mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
Enable testing against Safari on Sauce Labs
* Provide a fallback mode in the Karma tests which tests against a local browser (defaults to Firefox) if Sauce Labs credentials are not set. This is useful for local testing for contributors who might not have a Sauce Labs account. * Add Safari under OS X to the set of Sauce Labs browsers that the Karma tests are run against, following the merge of the WombatJS fixes for Safari and Edge. Although Edge now works under manual testing, automated testing against Sauce Labs is not yet working for reasons yet to be determined.
This commit is contained in:
parent
9c88b1fd20
commit
4f86a895c5
@ -1,8 +1,3 @@
|
||||
if (!process.env['SAUCE_USERNAME'] || !process.env['SAUCE_ACCESS_KEY']) {
|
||||
console.error('Sauce Labs account details not set, skipping Karma tests');
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
var sauceLabsConfig = {
|
||||
testName: 'PyWB Client Tests',
|
||||
};
|
||||
@ -15,7 +10,7 @@ if (process.env.TRAVIS_JOB_NUMBER) {
|
||||
|
||||
var WOMBAT_JS_PATH = 'pywb/static/wombat.js';
|
||||
|
||||
var customLaunchers = {
|
||||
var sauceLaunchers = {
|
||||
sl_chrome: {
|
||||
base: 'SauceLabs',
|
||||
browserName: 'chrome',
|
||||
@ -26,18 +21,20 @@ var customLaunchers = {
|
||||
browserName: 'firefox',
|
||||
},
|
||||
|
||||
/* Safari and Edge are currently broken in
|
||||
pywb.
|
||||
|
||||
See: https://github.com/ikreymer/pywb/issues/148 (Edge)
|
||||
https://github.com/ikreymer/pywb/issues/147 (Safari)
|
||||
|
||||
sl_safari: {
|
||||
base: 'SauceLabs',
|
||||
browserName: 'safari',
|
||||
platform: 'OS X 10.11',
|
||||
version: '9.0',
|
||||
},
|
||||
|
||||
/* Edge is currently broken in
|
||||
pywb.
|
||||
|
||||
See: https://github.com/ikreymer/pywb/issues/148 (Edge)
|
||||
https://github.com/ikreymer/pywb/issues/147 (Safari)
|
||||
|
||||
|
||||
sl_edge: {
|
||||
base: 'SauceLabs',
|
||||
browserName: 'MicrosoftEdge',
|
||||
@ -45,6 +42,24 @@ var customLaunchers = {
|
||||
*/
|
||||
};
|
||||
|
||||
var localLaunchers = {
|
||||
localFirefox: {
|
||||
base: 'Firefox',
|
||||
},
|
||||
};
|
||||
|
||||
var customLaunchers = {};
|
||||
|
||||
if (process.env['SAUCE_USERNAME'] && process.env['SAUCE_ACCESS_KEY']) {
|
||||
customLaunchers = sauceLaunchers;
|
||||
} else {
|
||||
console.error('Sauce Labs account details not set, ' +
|
||||
'Karma tests will be run only against local browsers.' +
|
||||
'Set SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables to ' +
|
||||
'run tests against Sauce Labs browsers');
|
||||
customLaunchers = localLaunchers;
|
||||
}
|
||||
|
||||
module.exports = function(config) {
|
||||
config.set({
|
||||
basePath: '../',
|
||||
|
Loading…
x
Reference in New Issue
Block a user