mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-23 00:39:54 +00:00
Merge pull request #15955 from twbs/fixture-on-screen-ios
Unit tests: Only display fixture on-screen for iOS
This commit is contained in:
commit
c80872235f
@ -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 -->
|
||||
|
Loading…
x
Reference in New Issue
Block a user