Skip to content

Commit

Permalink
update spacing on expected outcome
Browse files Browse the repository at this point in the history
  • Loading branch information
cecille committed Apr 5, 2024
1 parent 91e7b6d commit 415ee0a
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/python_testing/test_plan_table_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,18 @@ def main(filename, classname, test):
test_instance = test_class(config)
steps = test_instance.get_test_steps(test)
indent = 6
header_num = f'{"**#**":<{indent}}'
header_num_step = f'|{header_num} |*TestStep* '
s = ('[cols="5%,45%,45%"]\n'
'|===\n'
'|**#** |*Test Step*|*Expected Outcome*\n')
f'{header_num_step}|*Expected Outcome*\n')
for step in steps:
# add 2 to indent for a| and | at start
s += f'|{step.test_plan_number:<{indent}}a|{indent_multiline(step.description, indent+3)}\n'
padding = (indent + 1) * ' '
s += f'{padding}a|{indent_multiline(step.expectation, indent+3)}\n\n'
step_num = f'|{step.test_plan_number:<{indent}}a|'
s += f'{step_num}{indent_multiline(step.description, len(step_num))}\n'

padding = (len(header_num_step) - 1) * ' '
# add 2 to indent for a| at start
s += f'{padding}a|{indent_multiline(step.expectation, len(padding)+2)}\n\n'
s += '|===\n'

print(s)
Expand Down

0 comments on commit 415ee0a

Please sign in to comment.