diff options
| author | Heinrich Fenkart <[email protected]> | 2015-03-01 09:46:49 +0100 |
|---|---|---|
| committer | Heinrich Fenkart <[email protected]> | 2015-03-01 09:49:59 +0100 |
| commit | 20fb55a840f1b8ae7c3ccaa86acb10a2554b903c (patch) | |
| tree | 301be1cceacfa242e0b27472da5ddda51c5d831f | |
| parent | 1ba2630ccf460106036129086c98c5bacd7baa98 (diff) | |
| download | bootstrap-20fb55a840f1b8ae7c3ccaa86acb10a2554b903c.tar.xz bootstrap-20fb55a840f1b8ae7c3ccaa86acb10a2554b903c.zip | |
Unit tests: Only display fixture on-screen for iOS
Since only on iOS tests fail when the fixture is displayed off-screen, see https://travis-ci.org/twbs/bootstrap/jobs/52605742
| -rw-r--r-- | js/tests/index.html | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/js/tests/index.html b/js/tests/index.html index cdfe02b27..6f94e415d 100644 --- a/js/tests/index.html +++ b/js/tests/index.html @@ -11,12 +11,6 @@ <!-- QUnit --> <link rel="stylesheet" href="vendor/qunit.css" media="screen"> <script src="vendor/qunit.js"></script> - <style> - #qunit-fixture { - top: 0; - left: 0; - } - </style> <script> // See https://github.com/axemclion/grunt-saucelabs#test-result-details-with-qunit var log = [] @@ -52,6 +46,17 @@ $('#qunit-fixture').empty() $('#modal-test, .modal-backdrop').remove() }) + + // Display fixture on-screen on iOS to avoid false positives + if (/iPhone|iPad|iPod/.test(navigator.userAgent)) { + QUnit.begin(function() { + $('#qunit-fixture').css({ top: 0, left: 0 }) + }) + + QUnit.done(function () { + $('#qunit-fixture').css({ top: '', left: '' }) + }) + } </script> <!-- Plugin sources --> |
