forked from python-openxml/python-docx
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdoc-add-heading.feature
More file actions
25 lines (20 loc) · 840 Bytes
/
doc-add-heading.feature
File metadata and controls
25 lines (20 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Feature: Add a heading paragraph
In order add a heading to a document
As a developer using python-docx
I need a way to add a heading with its text and level in a single step
Scenario: Add a heading specifying only its text
Given a document having built-in styles
When I add a heading specifying only its text
Then the style of the last paragraph is 'Heading 1'
And the last paragraph contains the heading text
Scenario Outline: Add a heading specifying level
Given a document having built-in styles
When I add a heading specifying level=<level>
Then the style of the last paragraph is '<style>'
Examples: Heading level styles
| level | style |
| 0 | Title |
| 1 | Heading 1 |
| 2 | Heading 2 |
| 5 | Heading 5 |
| 9 | Heading 9 |