File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,3 +27,9 @@ Feature: Access document collections
2727 Scenario : Access the tables collection of a document
2828 Given a document having three tables
2929 Then document.tables is a list containing three tables
30+
31+
32+ @wip
33+ Scenario : Document.bookmarks
34+ Given a Document object as document
35+ Then document.bookmarks is a Bookmarks object
Original file line number Diff line number Diff line change @@ -27,6 +27,11 @@ def given_a_blank_document(context):
2727 context .document = Document (test_docx ('doc-word-default-blank' ))
2828
2929
30+ @given ('a Document object as document' )
31+ def given_a_Document_object_as_document (context ):
32+ context .document = Document (test_docx ('doc-default' ))
33+
34+
3035@given ('a document having built-in styles' )
3136def given_a_document_having_builtin_styles (context ):
3237 context .document = Document ()
@@ -172,6 +177,13 @@ def when_I_execute_section_eq_document_add_section(context):
172177
173178# then ====================================================
174179
180+ @then ('document.bookmarks is a Bookmarks object' )
181+ def then_document_bookmarks_is_a_Bookmarks_object (context ):
182+ actual = context .document .bookmarks .__class__ .__name__
183+ expected = 'Bookmarks'
184+ assert actual == expected , 'document.bookmarks is a %s object' % actual
185+
186+
175187@then ('document.inline_shapes is an InlineShapes object' )
176188def then_document_inline_shapes_is_an_InlineShapes_object (context ):
177189 document = context .document
You can’t perform that action at this time.
0 commit comments