aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Rebert <[email protected]>2015-03-01 18:28:46 -0800
committerChris Rebert <[email protected]>2015-03-01 18:28:46 -0800
commitc80872235faaeaf1e8029665fb7674c2e1ba1d8c (patch)
tree13500a81a9895e14b338a39101f9b7952f5b8c43
parentde0722f989bcbb2b2296cfe969bd48b0add3b1f3 (diff)
parent20fb55a840f1b8ae7c3ccaa86acb10a2554b903c (diff)
downloadbootstrap-c80872235faaeaf1e8029665fb7674c2e1ba1d8c.tar.xz
bootstrap-c80872235faaeaf1e8029665fb7674c2e1ba1d8c.zip
Merge pull request #15955 from twbs/fixture-on-screen-ios
Unit tests: Only display fixture on-screen for iOS
-rw-r--r--js/tests/index.html17
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 -->