File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -4,11 +4,14 @@ Feature: Add a table
44 I need a way to add a table
55
66
7+ @wip
78 Scenario : Add a table specifying only row and column count
89 Given a blank document
910 When I add a 2 x 2 table specifying only row and column count
1011 Then the document contains a 2 x 2 table
1112 And table.style is styles['Normal Table' ]
13+ And the width of each column is 3.0 inches
14+ And the width of each cell is 3.0 inches
1215
1316
1417 Scenario : Add a table specifying style
Original file line number Diff line number Diff line change @@ -358,3 +358,19 @@ def _cell(table, idx):
358358 idx , inches = int (n_str ) - 1 , float (inches_str )
359359 cell = _cell (context .table_ , idx )
360360 assert cell .width == Inches (inches ), 'got %s' % cell .width .inches
361+
362+
363+ @then ('the width of each cell is {inches} inches' )
364+ def then_the_width_of_each_cell_is_inches (context , inches ):
365+ table = context .table_
366+ expected_width = Inches (float (inches ))
367+ for cell in table ._cells :
368+ assert cell .width == expected_width , 'got %s' % cell .width .inches
369+
370+
371+ @then ('the width of each column is {inches} inches' )
372+ def then_the_width_of_each_column_is_inches (context , inches ):
373+ table = context .table_
374+ expected_width = Inches (float (inches ))
375+ for column in table .columns :
376+ assert column .width == expected_width , 'got %s' % column .width .inches
You can’t perform that action at this time.
0 commit comments