File: doc-add-heading.feature

package info (click to toggle)
python-docx 1.2.0%2Bdfsg-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 7,216 kB
  • sloc: xml: 25,323; python: 23,414; makefile: 175
file content (25 lines) | stat: -rw-r--r-- 840 bytes parent folder | download | duplicates (3)
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 |