aboutsummaryrefslogtreecommitdiff
path: root/tests/conversion_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/conversion_tests.py')
-rw-r--r--tests/conversion_tests.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/conversion_tests.py b/tests/conversion_tests.py
index 38aa1a8..a2b1a0b 100644
--- a/tests/conversion_tests.py
+++ b/tests/conversion_tests.py
@@ -348,6 +348,19 @@ def docx_table_is_converted_to_table_in_html():
@istest
+def table_style_mappings_can_be_used_to_map_tables():
+ table = documents.table([], style_name="Normal Table")
+ result = convert_document_element_to_html(
+ table,
+ style_map=[
+ _style_mapping("table[style-name='Normal Table'] => table.normal-table:fresh"),
+ ],
+ )
+ expected_html = '<table class="normal-table"></table>'
+ assert_equal(expected_html, result.value)
+
+
+@istest
def header_rows_are_wrapped_in_thead():
table = documents.table([
documents.table_row([documents.table_cell([])], is_header=True),