#4 test case -- construction of a table

Closed
opened 8 years ago by herby · 0 comments

Originally at 2015-02-28T15:04:28Z by Hannes Hirzel closed at 2015-03-01T20:48:17Z

How would the test case from domite which constructs a table look like in silk?

testInsertTable
| d tbl tr |
d := self testedClass at: 'html body div#fixture'.
tbl := self testedClass newElement: 'table'.
tr := self testedClass newElement: 'tr'.
tr << ((self testedClass newElement: 'td') << 'A').
tr << ((self testedClass newElement: 'td') << 'B').
tr << ((self testedClass 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 assertBodyEndsWith: '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>'
Originally at 2015-02-28T15:04:28Z by Hannes Hirzel closed at 2015-03-01T20:48:17Z How would the test case from ``domite`` which constructs a table look like in ``silk``? ```` testInsertTable | d tbl tr | d := self testedClass at: 'html body div#fixture'. tbl := self testedClass newElement: 'table'. tr := self testedClass newElement: 'tr'. tr << ((self testedClass newElement: 'td') << 'A'). tr << ((self testedClass newElement: 'td') << 'B'). tr << ((self testedClass 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 assertBodyEndsWith: '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>' ````
Sign in to join this conversation.
No Label
No Milestone
No assignee
1 Participants
Loading...
Cancel
Save
There is no content yet.