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 }} TRAVIS_JOB_NUMBER: ${{ github.run_id }}-${{ github.run_number }}-${{ github.job }}
GIT_HASH: ${{ steps.environment.outputs.sha_short }} GIT_HASH: ${{ steps.environment.outputs.sha_short }}
run: | 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 () { 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); this.timeout(120000);
if (helper.admin$('.ep_align').length === 0) this.skip(); if (helper.admin$('.ep_align').length === 0) this.skip();
@ -72,8 +70,6 @@ describe('Plugins page', function () {
// allow 50 seconds, check every 1 second. // allow 50 seconds, check every 1 second.
}); });
it('Attempt to Install a plugin', async function () { 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); this.timeout(240000);
helper.admin$('#search-query').val('ep_activepads'); helper.admin$('#search-query').val('ep_activepads');
@ -96,8 +92,6 @@ describe('Plugins page', function () {
}); });
it('Attempt to Uninstall a plugin', async 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); this.timeout(360000);
await helper.waitForPromise( await helper.waitForPromise(
() => helper.admin$('.ep_activepads .do-uninstall').length !== 0, 120000); () => 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 () { 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 // save old value
const settings = helper.admin$('.settings').val(); const settings = helper.admin$('.settings').val();
const settingsLength = settings.length; const settingsLength = settings.length;
@ -60,9 +57,6 @@ describe('Admin > Settings', function () {
} }
it('restart works', async 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 // restarts
helper.admin$('#restartEtherpad').click(); helper.admin$('#restartEtherpad').click();

View file

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