diff --git a/Gruntfile.js b/Gruntfile.js index 6ad3da11..39f2f21b 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -229,7 +229,7 @@ module.exports = function(grunt) { options: { username: 'openpgpjs', key: getSauceKey, - urls: ['http://127.0.0.1:3000/test/unittests.html'], + urls: ['http://127.0.0.1:3000/test/unittests.html?saucelabs=true'], build: process.env.TRAVIS_BUILD_ID, testname: 'Sauce Unit Test for openpgpjs', browsers: [browser_capabilities], diff --git a/test/unittests.js b/test/unittests.js index 9359c60b..bb2f53d9 100644 --- a/test/unittests.js +++ b/test/unittests.js @@ -37,7 +37,8 @@ describe('Unit Tests', function () { if (typeof window !== 'undefined') { afterEach(function () { - if (window.scrollY >= document.body.scrollHeight - window.innerHeight - 100) { + if (window.scrollY >= document.body.scrollHeight - window.innerHeight - 100 + || openpgp.config.saucelabs) { window.scrollTo(0, document.body.scrollHeight); } });