|
@@ -117,6 +117,29 @@ testInsertStringInFragment
|
|
self assert: (document body innerHTML endsWith: '>sentinela foo in a bar</div>')
|
|
self assert: (document body innerHTML endsWith: '>sentinela foo in a bar</div>')
|
|
!
|
|
!
|
|
|
|
|
|
|
|
+testInsertTable
|
|
|
|
+ | d tbl tr |
|
|
|
|
+ d := Domite at: 'html body div#fixture'.
|
|
|
|
+ tbl := Domite newElement: 'table'.
|
|
|
|
+
|
|
|
|
+ tr := Domite newElement: 'tr'.
|
|
|
|
+ tr << ((Domite newElement: 'td') << 'A').
|
|
|
|
+ tr << ((Domite newElement: 'td') << 'B').
|
|
|
|
+ tr << ((Domite newElement: 'td') << 'C').
|
|
|
|
+
|
|
|
|
+ tbl << tr.
|
|
|
|
+
|
|
|
|
+ tr := Domite newElement: 'tr'.
|
|
|
|
+ tr << ((Domite newElement: 'td') << 'D').
|
|
|
|
+ tr << ((Domite newElement: 'td') << 'E').
|
|
|
|
+ tr << ((Domite newElement: 'td') << 'F').
|
|
|
|
+
|
|
|
|
+ tbl << tr.
|
|
|
|
+ d << tbl.
|
|
|
|
+
|
|
|
|
+ self assert: (document body innerHTML endsWith: 'table><tr><td>A</td><td>B</td><td>C</td></tr><tr><td>D</td><td>E</td><td>F</td></tr></table></div>')
|
|
|
|
+!
|
|
|
|
+
|
|
testMultipleInserts
|
|
testMultipleInserts
|
|
| d p s |
|
|
| d p s |
|
|
d := Domite fromElement: fixtureDiv.
|
|
d := Domite fromElement: fixtureDiv.
|