diff --git a/.github/workflows/frontend-admin-tests.yml b/.github/workflows/frontend-admin-tests.yml index e1302ddfe..6f95a6c7f 100644 --- a/.github/workflows/frontend-admin-tests.yml +++ b/.github/workflows/frontend-admin-tests.yml @@ -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 diff --git a/src/tests/frontend/specs/adminplugins.js b/src/tests/frontend/specs/adminplugins.js index 8d57f960d..ba00d3e48 100755 --- a/src/tests/frontend/specs/adminplugins.js +++ b/src/tests/frontend/specs/adminplugins.js @@ -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); diff --git a/src/tests/frontend/specs/adminsettings.js b/src/tests/frontend/specs/adminsettings.js index 28675f656..0d7d0accb 100644 --- a/src/tests/frontend/specs/adminsettings.js +++ b/src/tests/frontend/specs/adminsettings.js @@ -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(); diff --git a/src/tests/frontend/travis/remote_runner.js b/src/tests/frontend/travis/remote_runner.js index c5f3f1466..5a75dbe66 100644 --- a/src/tests/frontend/travis/remote_runner.js +++ b/src/tests/frontend/travis/remote_runner.js @@ -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);