File tree Expand file tree Collapse file tree 2 files changed +22
-4
lines changed
Expand file tree Collapse file tree 2 files changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -124,6 +124,12 @@ def when_apply_style_to_table(context):
124124 table .style = 'LightShading-Accent1'
125125
126126
127+ @when ('I set the column width to {width_emu}' )
128+ def when_I_set_the_column_width_to_width_emu (context , width_emu ):
129+ new_value = None if width_emu == 'None' else int (width_emu )
130+ context .column .width = new_value
131+
132+
127133# then =====================================================
128134
129135@then ('I can access a cell using its row and column indices' )
@@ -280,10 +286,7 @@ def then_new_row_has_2_cells(context):
280286
281287@then ('the reported column width is {width_emu}' )
282288def then_the_reported_column_width_is_width_emu (context , width_emu ):
283- expected_value = {
284- 'None' : None ,
285- '914400' : 914400 ,
286- }[width_emu ]
289+ expected_value = None if width_emu == 'None' else int (width_emu )
287290 assert context .column .width == expected_value
288291
289292
Original file line number Diff line number Diff line change @@ -12,3 +12,18 @@ Feature: Get and set table column widths
1212 | width | width -emu |
1313 | no explicit setting | None |
1414 | 1440 | 914400 |
15+
16+
17+ @wip
18+ Scenario Outline : Set column width
19+ Given a table column having a width of <width>
20+ When I set the column width to <new-width>
21+ Then the reported column width is <new-width>
22+
23+ Examples : table column width values
24+ | width | new -width |
25+ | no explicit setting | None |
26+ | no explicit setting | 914400 |
27+ | 1440 | None |
28+ | 1440 | 914400 |
29+ | 1440 | 424242 |
You can’t perform that action at this time.
0 commit comments