new approach to limiting which browsers fire

This commit is contained in:
John McLear 2021-02-07 10:30:19 +00:00
parent e28161a2d1
commit d2d3617bcc
4 changed files with 60 additions and 61 deletions

View file

@ -51,4 +51,4 @@ jobs:
TRAVIS_JOB_NUMBER: ${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}
GIT_HASH: ${{ steps.environment.outputs.sha_short }}
run: |
src/tests/frontend/travis/runner.sh
src/tests/frontend/travis/adminrunner.sh

View file

@ -33,8 +33,6 @@ describe('Plugins page', function () {
});
it('Attempt to Update a plugin', async function () {
// !IMPORTANT! We only run admin tests in one browser!
if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) this.skip();
this.timeout(120000);
if (helper.admin$('.ep_align').length === 0) this.skip();
@ -72,8 +70,6 @@ describe('Plugins page', function () {
// allow 50 seconds, check every 1 second.
});
it('Attempt to Install a plugin', async function () {
// !IMPORTANT! We only run admin tests in one browser!
if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) this.skip();
this.timeout(240000);
helper.admin$('#search-query').val('ep_activepads');
@ -96,8 +92,6 @@ describe('Plugins page', function () {
});
it('Attempt to Uninstall a plugin', async function () {
// !IMPORTANT! We only run admin tests in one browser!
if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) this.skip();
this.timeout(360000);
await helper.waitForPromise(
() => helper.admin$('.ep_activepads .do-uninstall').length !== 0, 120000);

View file

@ -20,9 +20,6 @@ describe('Admin > Settings', function () {
});
it('Are Settings visible, populated, does save work', async function () {
// !IMPORTANT! We only run admin tests in one browser!
if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) this.skip();
// save old value
const settings = helper.admin$('.settings').val();
const settingsLength = settings.length;
@ -60,9 +57,6 @@ describe('Admin > Settings', function () {
}
it('restart works', async function () {
// !IMPORTANT! We only run admin tests in one browser!
if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) this.skip();
// restarts
helper.admin$('#restartEtherpad').click();

View file

@ -10,6 +10,8 @@ const config = {
accessKey: process.env.SAUCE_ACCESS_KEY,
};
const isAdminRunner = process.argv[2] === 'admin';
let allTestsPassed = true;
// overwrite the default exit code
// in case not all worker can be run (due to saucelabs limits),
@ -126,57 +128,66 @@ const sauceTestWorker = async.queue((testSettings, callback) => {
});
}, 6); // run 6 tests in parrallel
// 1) Firefox on Linux
sauceTestWorker.push({
platform: 'Windows 7',
browserName: 'firefox',
version: '52.0',
});
if (!isAdminRunner) {
// 1) Firefox on Linux
sauceTestWorker.push({
platform: 'Windows 7',
browserName: 'firefox',
version: '52.0',
});
// 2) Chrome on Linux
sauceTestWorker.push({
platform: 'Windows 7',
browserName: 'chrome',
version: '55.0',
args: ['--use-fake-device-for-media-stream'],
});
// 2) Chrome on Linux
sauceTestWorker.push({
platform: 'Windows 7',
browserName: 'chrome',
version: '55.0',
args: ['--use-fake-device-for-media-stream'],
});
/*
// 3) Safari on OSX 10.15
sauceTestWorker.push({
'platform' : 'OS X 10.15'
, 'browserName' : 'safari'
, 'version' : '13.1'
});
*/
/*
// 3) Safari on OSX 10.15
sauceTestWorker.push({
'platform' : 'OS X 10.15'
, 'browserName' : 'safari'
, 'version' : '13.1'
});
*/
// 4) Safari on OSX 10.14
sauceTestWorker.push({
platform: 'OS X 10.15',
browserName: 'safari',
version: '13.1',
});
// IE 10 doesn't appear to be working anyway
/*
// 4) IE 10 on Win 8
sauceTestWorker.push({
'platform' : 'Windows 8'
, 'browserName' : 'iexplore'
, 'version' : '10.0'
});
*/
// 5) Edge on Win 10
sauceTestWorker.push({
platform: 'Windows 10',
browserName: 'microsoftedge',
version: '83.0',
});
// 6) Firefox on Win 7
sauceTestWorker.push({
platform: 'Windows 7',
browserName: 'firefox',
version: '78.0',
});
// 4) Safari on OSX 10.14
sauceTestWorker.push({
platform: 'OS X 10.15',
browserName: 'safari',
version: '13.1',
});
// IE 10 doesn't appear to be working anyway
/*
// 4) IE 10 on Win 8
sauceTestWorker.push({
'platform' : 'Windows 8'
, 'browserName' : 'iexplore'
, 'version' : '10.0'
});
*/
// 5) Edge on Win 10
sauceTestWorker.push({
platform: 'Windows 10',
browserName: 'microsoftedge',
version: '83.0',
});
// 6) Firefox on Win 7
sauceTestWorker.push({
platform: 'Windows 7',
browserName: 'firefox',
version: '78.0',
});
} else {
// 4) Safari on OSX 10.14
sauceTestWorker.push({
platform: 'OS X 10.15',
browserName: 'safari',
version: '13.1',
});
}
sauceTestWorker.drain(() => {
process.exit(allTestsPassed ? 0 : 1);