Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
b3e546c4
Commit
b3e546c4
authored
Dec 28, 2012
by
Oleg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rewrite tests for colgroup, caption
Add tests for thead, tbody, tfoot
parent
62158409
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
manipulation.js
test/unit/manipulation.js
+8
-7
No files found.
test/unit/manipulation.js
View file @
b3e546c4
...
@@ -395,13 +395,13 @@ var testAppendForObject = function( valueObj, isFragment ) {
...
@@ -395,13 +395,13 @@ var testAppendForObject = function( valueObj, isFragment ) {
var
testAppend
=
function
(
valueObj
)
{
var
testAppend
=
function
(
valueObj
)
{
expect
(
6
3
);
expect
(
6
6
);
testAppendForObject
(
valueObj
,
false
);
testAppendForObject
(
valueObj
,
false
);
testAppendForObject
(
valueObj
,
true
);
testAppendForObject
(
valueObj
,
true
);
var
defaultText
,
result
,
message
,
iframe
,
iframeDoc
,
j
,
d
,
var
defaultText
,
result
,
message
,
iframe
,
iframeDoc
,
j
,
d
,
$input
,
$radioChecked
,
$radioUnchecked
,
$radioParent
,
$map
;
$input
,
$radioChecked
,
$radioUnchecked
,
$radioParent
,
$map
,
$table
;
defaultText
=
"Try them out:"
;
defaultText
=
"Try them out:"
;
result
=
jQuery
(
"#first"
).
append
(
valueObj
(
"<b>buga</b>"
)
);
result
=
jQuery
(
"#first"
).
append
(
valueObj
(
"<b>buga</b>"
)
);
...
@@ -458,15 +458,16 @@ var testAppend = function( valueObj ) {
...
@@ -458,15 +458,16 @@ var testAppend = function( valueObj ) {
equal
(
jQuery
(
"#select1 optgroup"
).
attr
(
"label"
),
"optgroup"
,
"Label attribute in newly inserted optgroup is correct"
);
equal
(
jQuery
(
"#select1 optgroup"
).
attr
(
"label"
),
"optgroup"
,
"Label attribute in newly inserted optgroup is correct"
);
equal
(
jQuery
(
"#select1 option:last"
).
text
(),
"optgroup"
,
"Appending optgroup"
);
equal
(
jQuery
(
"#select1 option:last"
).
text
(),
"optgroup"
,
"Appending optgroup"
);
jQuery
(
"#table"
).
append
(
valueObj
(
"<colgroup></colgroup>"
)
);
$table
=
jQuery
(
"#table"
);
equal
(
jQuery
(
"#table colgroup"
).
length
,
1
,
"Append colgroup"
);
jQuery
.
each
(
"thead tbody tfoot colgroup caption"
.
split
(
" "
),
function
(
i
,
name
)
{
$table
.
append
(
valueObj
(
"<"
+
name
+
"/>"
)
);
equal
(
$table
.
find
(
name
).
length
,
1
,
"Append "
+
name
);
});
jQuery
(
"#table colgroup"
).
append
(
valueObj
(
"<col/>"
)
);
jQuery
(
"#table colgroup"
).
append
(
valueObj
(
"<col/>"
)
);
equal
(
jQuery
(
"#table colgroup col"
).
length
,
1
,
"Append col"
);
equal
(
jQuery
(
"#table colgroup col"
).
length
,
1
,
"Append col"
);
jQuery
(
"#table"
).
append
(
valueObj
(
"<caption></caption>"
)
);
equal
(
jQuery
(
"#table caption"
).
length
,
1
,
"Append caption"
);
jQuery
(
"#form"
)
jQuery
(
"#form"
)
.
append
(
valueObj
(
"<select id='appendSelect1'></select>"
)
)
.
append
(
valueObj
(
"<select id='appendSelect1'></select>"
)
)
.
append
(
valueObj
(
"<select id='appendSelect2'><option>Test</option></select>"
)
);
.
append
(
valueObj
(
"<select id='appendSelect2'><option>Test</option></select>"
)
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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