Commit 20fb55a8 authored by Heinrich Fenkart's avatar Heinrich Fenkart
Browse files

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
parent 1ba2630c
5 merge requests!28721Hot test,!15955Unit tests: Only display fixture on-screen for iOS,!16605Test pull please ignore,!22103test,!25326Adjust examples
Showing with 11 additions and 6 deletions
+11 -6
...@@ -11,12 +11,6 @@ ...@@ -11,12 +11,6 @@
<!-- QUnit --> <!-- QUnit -->
<link rel="stylesheet" href="vendor/qunit.css" media="screen"> <link rel="stylesheet" href="vendor/qunit.css" media="screen">
<script src="vendor/qunit.js"></script> <script src="vendor/qunit.js"></script>
<style>
#qunit-fixture {
top: 0;
left: 0;
}
</style>
<script> <script>
// See https://github.com/axemclion/grunt-saucelabs#test-result-details-with-qunit // See https://github.com/axemclion/grunt-saucelabs#test-result-details-with-qunit
var log = [] var log = []
...@@ -52,6 +46,17 @@ ...@@ -52,6 +46,17 @@
$('#qunit-fixture').empty() $('#qunit-fixture').empty()
$('#modal-test, .modal-backdrop').remove() $('#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> </script>
<!-- Plugin sources --> <!-- Plugin sources -->
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment