diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-11-29 22:05:08 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-11-29 22:05:08 +0000 |
| commit | 1b5c951358623ddb97a237efab72479d9dd9c4ca (patch) | |
| tree | c66c0fbdf9b3a2333de0c2418f4acb86618e1298 /tests/html | |
| parent | 475077337689abeed1db21a832d26dbc2ae88672 (diff) | |
Add separator html.Element
Diffstat (limited to 'tests/html')
| -rw-r--r-- | tests/html/collapse_tests.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/html/collapse_tests.py b/tests/html/collapse_tests.py index 52cecd2..5dc7e6c 100644 --- a/tests/html/collapse_tests.py +++ b/tests/html/collapse_tests.py @@ -105,3 +105,21 @@ def element_with_choice_of_tag_names_can_collapse_into_previous_element_if_it_ha html.collapsible_element(["ul", "ol"]), html.collapsible_element("ol") ])) + + +@istest +def when_separator_is_present_then_separator_is_prepended_to_collapsed_element(): + assert_equal( + [ + html.element("pre", collapsible=False, children=[ + html.text("Hello"), + html.text("\n"), + html.text(" the"), + html.text("re") + ]) + ], + html.collapse([ + html.element("pre", collapsible=False, children=[html.text("Hello")]), + html.element("pre", collapsible=True, separator="\n", children=[html.text(" the"), html.text("re")]), + ]), + ) |
