Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
2f76821a
Commit
2f76821a
authored
11 years ago
by
fat
Browse files
Options
Download
Email Patches
Plain Diff
new qunit
parent
bc074d54
No related merge requests found
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
js/collapse.js
+1
-0
js/collapse.js
js/tests/index.html
+2
-5
js/tests/index.html
js/tests/unit/modal.js
+3
-4
js/tests/unit/modal.js
js/tests/unit/tab.js
+6
-3
js/tests/unit/tab.js
js/tests/unit/tooltip.js
+2
-1
js/tests/unit/tooltip.js
js/tests/unit/transition.js
+0
-13
js/tests/unit/transition.js
js/tests/vendor/jquery.js
+1
-1
js/tests/vendor/jquery.js
js/tests/vendor/qunit.css
+46
-27
js/tests/vendor/qunit.css
js/tests/vendor/qunit.js
+1694
-1036
js/tests/vendor/qunit.js
with
1755 additions
and
1090 deletions
+1755
-1090
js/collapse.js
+
1
-
0
View file @
2f76821a
...
...
@@ -127,6 +127,7 @@
var
data
=
$this
.
data
(
'
bs.collapse
'
)
var
options
=
$
.
extend
({},
Collapse
.
DEFAULTS
,
$this
.
data
(),
typeof
option
==
'
object
'
&&
option
)
if
(
!
data
&&
options
.
toggle
&&
option
==
'
show
'
)
option
=
!
option
if
(
!
data
)
$this
.
data
(
'
bs.collapse
'
,
(
data
=
new
Collapse
(
this
,
options
)))
if
(
typeof
option
==
'
string
'
)
data
[
option
]()
})
...
...
This diff is collapsed.
Click to expand it.
js/tests/index.html
+
2
-
5
View file @
2f76821a
...
...
@@ -17,7 +17,7 @@
</script>
<!-- plugin sources -->
<script
src=
"../../js/
transition
.js"
>
</script>
<script
>
$
.
support
.
transition
=
false
</script>
<script
src=
"../../js/alert.js"
></script>
<script
src=
"../../js/button.js"
></script>
<script
src=
"../../js/carousel.js"
></script>
...
...
@@ -47,10 +47,7 @@
</head>
<body>
<div>
<h1
id=
"qunit-header"
>
Bootstrap Plugin Test Suite
</h1>
<h2
id=
"qunit-banner"
></h2>
<h2
id=
"qunit-userAgent"
></h2>
<ol
id=
"qunit-tests"
></ol>
<div
id=
"qunit"
></div>
<div
id=
"qunit-fixture"
></div>
</div>
</body>
...
...
This diff is collapsed.
Click to expand it.
js/tests/unit/modal.js
+
3
-
4
View file @
2f76821a
...
...
@@ -157,16 +157,15 @@ $(function () {
test
(
'
should trigger hide event once when clicking outside of modal-content
'
,
function
()
{
stop
()
$
.
support
.
transition
=
false
var
div
=
$
(
'
<div id="modal-test"><div class="contents"></div></div>
'
)
var
triggered
var
div
=
$
(
'
<div id="modal-test"><div class="contents"></div></div>
'
)
div
.
bind
(
'
shown.bs.modal
'
,
function
()
{
triggered
=
0
$
(
'
#modal-test
'
).
click
()
})
.
one
(
'
hidden.bs.modal
'
,
function
()
{
div
.
modal
(
'
show
'
)
})
.
bind
(
'
hide.bs.modal
'
,
function
()
{
triggered
+=
1
ok
(
triggered
===
1
,
'
modal hide triggered once
'
)
...
...
This diff is collapsed.
Click to expand it.
js/tests/unit/tab.js
+
6
-
3
View file @
2f76821a
...
...
@@ -73,11 +73,14 @@ $(function () {
'
</ul>
'
$
(
dropHTML
).
find
(
'
ul>li:first a
'
).
tab
(
'
show
'
).
end
()
.
find
(
'
ul>li:last a
'
).
on
(
'
show
'
,
function
(
event
)
{
.
find
(
'
ul>li:last a
'
)
.
on
(
'
show.bs.tab
'
,
function
(
event
)
{
equal
(
event
.
relatedTarget
.
hash
,
'
#1-1
'
)
}).
on
(
'
shown
'
,
function
(
event
)
{
})
.
on
(
'
show.bs.tab
'
,
function
(
event
)
{
equal
(
event
.
relatedTarget
.
hash
,
'
#1-1
'
)
}).
tab
(
'
show
'
)
})
.
tab
(
'
show
'
)
})
})
This diff is collapsed.
Click to expand it.
js/tests/unit/tooltip.js
+
2
-
1
View file @
2f76821a
...
...
@@ -387,6 +387,8 @@ $(function () {
})
test
(
'
tooltips should be placed dynamically, with the dynamic placement option
'
,
function
()
{
$
(
document
.
body
).
scrollTop
(
0
)
// force to top of page
$
.
support
.
transition
=
false
var
ttContainer
=
$
(
'
<div id="dynamic-tt-test"/>
'
).
css
({
'
height
'
:
400
,
...
...
@@ -402,7 +404,6 @@ $(function () {
.
tooltip
({
placement
:
'
auto
'
})
.
tooltip
(
'
show
'
)
ok
(
$
(
'
.tooltip
'
).
is
(
'
.bottom
'
),
'
top positioned tooltip is dynamically positioned bottom
'
)
topTooltip
.
tooltip
(
'
hide
'
)
...
...
This diff is collapsed.
Click to expand it.
js/tests/unit/transition.js
deleted
100644 → 0
+
0
-
13
View file @
bc074d54
$
(
function
()
{
module
(
'
transition
'
)
test
(
'
should be defined on jquery support object
'
,
function
()
{
ok
(
$
.
support
.
transition
!==
undefined
,
'
transition object is defined
'
)
})
test
(
'
should provide an end object
'
,
function
()
{
ok
(
$
.
support
.
transition
?
$
.
support
.
transition
.
end
:
true
,
'
end string is defined
'
)
})
})
This diff is collapsed.
Click to expand it.
js/tests/vendor/jquery.js
+
1
-
1
View file @
2f76821a
This diff is collapsed.
Click to expand it.
js/tests/vendor/qunit.css
+
46
-
27
View file @
2f76821a
/**
* QUnit 1.0.0 - A JavaScript Unit Testing Framework
/*!
* QUnit 1.13.0
* http://qunitjs.com/
*
* http://docs.jquery.com/QUnit
* Copyright 2013 jQuery Foundation and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Copyright (c) 2011 John Resig, Jörn Zaefferer
* Dual licensed under the MIT (MIT-LICENSE.txt)
* or GPL (GPL-LICENSE.txt) licenses.
* Date: 2014-01-04T17:09Z
*/
/** Font Family and Sizes */
...
...
@@ -20,7 +21,7 @@
/** Resets */
#qunit-tests
,
#qunit-tests
ol
,
#qunit-header
,
#qunit-banner
,
#qunit-userAgent
,
#qunit-testresult
{
#qunit-tests
,
#qunit-header
,
#qunit-banner
,
#qunit-userAgent
,
#qunit-testresult
,
#qunit-modulefilter
{
margin
:
0
;
padding
:
0
;
}
...
...
@@ -38,10 +39,10 @@
line-height
:
1em
;
font-weight
:
normal
;
border-radius
:
1
5px
1
5px
0
0
;
-moz-border-radius
:
1
5px
1
5px
0
0
;
-webkit-border-top-right-radius
:
1
5px
;
-webkit-border-top-left-radius
:
1
5px
;
border-radius
:
5px
5px
0
0
;
-moz-border-radius
:
5px
5px
0
0
;
-webkit-border-top-right-radius
:
5px
;
-webkit-border-top-left-radius
:
5px
;
}
#qunit-header
a
{
...
...
@@ -54,6 +55,11 @@
color
:
#fff
;
}
#qunit-testrunner-toolbar
label
{
display
:
inline-block
;
padding
:
0
.5em
0
.1em
;
}
#qunit-banner
{
height
:
5px
;
}
...
...
@@ -62,6 +68,7 @@
padding
:
0.5em
0
0.5em
2em
;
color
:
#5E740B
;
background-color
:
#eee
;
overflow
:
hidden
;
}
#qunit-userAgent
{
...
...
@@ -71,6 +78,9 @@
text-shadow
:
rgba
(
0
,
0
,
0
,
0.5
)
2px
2px
1px
;
}
#qunit-modulefilter-container
{
float
:
right
;
}
/** Tests: Pass/Fail */
...
...
@@ -102,19 +112,24 @@
color
:
#000
;
}
#qunit-tests
ol
{
#qunit-tests
li
.runtime
{
float
:
right
;
font-size
:
smaller
;
}
.qunit-assert-list
{
margin-top
:
0.5em
;
padding
:
0.5em
;
background-color
:
#fff
;
border-radius
:
15px
;
-moz-border-radius
:
15px
;
-webkit-border-radius
:
15px
;
border-radius
:
5px
;
-moz-border-radius
:
5px
;
-webkit-border-radius
:
5px
;
}
box-shadow
:
inset
0px
2px
13px
#999
;
-moz-box-shadow
:
inset
0px
2px
13px
#999
;
-webkit-box-shadow
:
inset
0px
2px
13px
#999
;
.qunit-collapsed
{
display
:
none
;
}
#qunit-tests
table
{
...
...
@@ -157,8 +172,7 @@
#qunit-tests
b
.failed
{
color
:
#710909
;
}
#qunit-tests
li
li
{
margin
:
0.5em
;
padding
:
0.4em
0.5em
0.4em
0.5em
;
padding
:
5px
;
background-color
:
#fff
;
border-bottom
:
none
;
list-style-position
:
inside
;
...
...
@@ -167,9 +181,9 @@
/*** Passing Styles */
#qunit-tests
li
li
.pass
{
color
:
#
5E740B
;
color
:
#
3c510c
;
background-color
:
#fff
;
border-left
:
26
px
solid
#C6E746
;
border-left
:
10
px
solid
#C6E746
;
}
#qunit-tests
.pass
{
color
:
#528CE0
;
background-color
:
#D2E0E6
;
}
...
...
@@ -185,15 +199,15 @@
#qunit-tests
li
li
.fail
{
color
:
#710909
;
background-color
:
#fff
;
border-left
:
26
px
solid
#EE5757
;
border-left
:
10
px
solid
#EE5757
;
white-space
:
pre
;
}
#qunit-tests
>
li
:last-child
{
border-radius
:
0
0
1
5px
1
5px
;
-moz-border-radius
:
0
0
1
5px
1
5px
;
-webkit-border-bottom-right-radius
:
1
5px
;
-webkit-border-bottom-left-radius
:
1
5px
;
border-radius
:
0
0
5px
5px
;
-moz-border-radius
:
0
0
5px
5px
;
-webkit-border-bottom-right-radius
:
5px
;
-webkit-border-bottom-left-radius
:
5px
;
}
#qunit-tests
.fail
{
color
:
#000000
;
background-color
:
#EE5757
;
}
...
...
@@ -216,6 +230,9 @@
border-bottom
:
1px
solid
white
;
}
#qunit-testresult
.module-name
{
font-weight
:
bold
;
}
/** Fixture */
...
...
@@ -223,4 +240,6 @@
position
:
absolute
;
top
:
-10000px
;
left
:
-10000px
;
width
:
1000px
;
height
:
1000px
;
}
This diff is collapsed.
Click to expand it.
js/tests/vendor/qunit.js
+
1694
-
1036
View file @
2f76821a
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets