Skip to content

Commit 3c7ec69

Browse files
eupharisSteve Canny
authored andcommitted
acpt: add scenario for _BaseHeader.body
1 parent 14cb350 commit 3c7ec69

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

features/hdr-header-props.feature

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,9 @@ Feature: Header properties
1212
| having-or-no | value |
1313
| having a | False |
1414
| having no | True |
15+
16+
@wip
17+
Scenario: Get Header.body
18+
Given a header having a definition
19+
Then header.body is a BlockItemContainer object
20+
And header.body contains the text of the header

features/steps/header.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,20 @@ def given_a_header_having_or_no_definition(context, having_or_no):
2929

3030
# then =====================================================
3131

32-
@then(u'header.is_linked_to_previous is {value}')
32+
@then('header.body contains the text of the header')
33+
def then_header_body_contains_the_text_of_the_header(context):
34+
header = context.header
35+
text = header.body.paragraphs[0].text
36+
assert text == 'S1HP1'
37+
38+
39+
@then('header.body is a BlockItemContainer object')
40+
def then_header_body_is_a_BlockItemContainer_object(context):
41+
header = context.header
42+
assert type(header.body).__name__ == 'BlockItemContainer'
43+
44+
45+
@then('header.is_linked_to_previous is {value}')
3346
def then_header_is_linked_to_previous_is_value(context, value):
3447
expected_value = {'True': True, 'False': False}[value]
3548
header = context.header
13.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)