Skip to content

Commit 5145e50

Browse files
authored
Release 4.13.0 (#697)
1 parent 6272c29 commit 5145e50

File tree

6 files changed

+117
-188
lines changed

6 files changed

+117
-188
lines changed

docs/releasenotes/4.13.0.rst

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
:orphan:
2+
3+
==============
4+
Robotidy 4.13.0
5+
==============
6+
7+
Release dedicated ``AlignKeywordsSection`` and ``AlignTestCasesSection`` transformers.
8+
9+
You can install the latest available version by running
10+
11+
::
12+
13+
pip install --upgrade robotframework-tidy
14+
15+
or to install exactly this version
16+
17+
::
18+
19+
pip install robotframework-tidy==4.13.0
20+
21+
.. contents::
22+
:depth: 2
23+
:local:
24+
25+
26+
Transformers changes
27+
====================
28+
29+
Aligning test cases with [Template] (#657)
30+
------------------------------------------
31+
32+
Robotidy now aligns test cases with ``[Template]``. It is done by ``AlignTestCasesSection``.
33+
34+
Note that there is also ``AlignTemplatedTestCases`` which uses completely different approach for aligning test cases
35+
and only supports suites with ``Test Template`` setting.
36+
37+
Previously, following code::
38+
39+
*** Test Cases ***
40+
Testing Random List
41+
[Template] Validate Random List Selection
42+
${SIMPLE LIST} 2
43+
${MIXED LIST} 3
44+
${NESTED LIST} 4
45+
46+
would not be aligned and would be formatted to::
47+
48+
*** Test Cases ***
49+
Testing Random List
50+
[Template] Validate Random List Selection
51+
${SIMPLE LIST} 2
52+
${MIXED LIST} 3
53+
${NESTED LIST} 4
54+
55+
Now test cases with ``[Template]`` are formatted properly::
56+
57+
*** Test Cases ***
58+
Testing Random List
59+
[Template] Validate Random List Selection
60+
${SIMPLE LIST} 2
61+
${MIXED LIST} 3
62+
${NESTED LIST} 4
63+
64+
Align comments in AlignKeywordsSection and AlignTestCasesSection (#657)
65+
-----------------------------------------------------------------------
66+
67+
It is now possible to align lines with comments in ``AlignKeywordsSection`` and ``AlignTestCasesSection``
68+
transformers. Enable it by configuring ``align_comments`` parameter to ``True``.
69+
70+
It is especially useful if you want to use comments to name the aligned columns. For example::
71+
72+
*** Test Cases ***
73+
Testing Random List
74+
[Template] Validate Random List Selection
75+
# collection nbr items
76+
${SIMPLE LIST} 2 # first test
77+
${MIXED LIST} 3 # second test
78+
${NESTED LIST} 4 # third test
79+
80+
Align settings separately in AlignKeywordsSection and AlignTestCasesSection (#657)
81+
----------------------------------------------------------------------------------
82+
83+
It is now possible to align settings separately from rest of the code in keyword / test case. Configure it
84+
using ``align_settings_separately`` parameter::
85+
86+
robotidy -c AlignKeywordsSection:align_settings_separately=True src
87+
robotidy -c AlignTestCasesSection:align_settings_separately=True src
88+
89+
Since this type of alignment depends on the width of the column it only works together with ``auto`` alignment type.
90+
91+
For example following code::
92+
93+
*** Test Cases ***
94+
Test Password Policy Minimum Length Input Errors
95+
[Timeout] 10 min
96+
[Tags] tag tag
97+
Log ${argument_name}
98+
Perform Action And Wait For Result ${argument_name}
99+
100+
It is by default (with ``alignment_type=auto`` and ``align_settings_separately=False``) formatted to::
101+
102+
*** Test Cases ***
103+
Test Password Policy Minimum Length Input Errors
104+
[Timeout] 10 min
105+
[Tags] tag tag
106+
Log ${argument_name}
107+
Perform Action And Wait For Result ${argument_name}
108+
109+
With ``alignment_type=auto`` and ``align_settings_separately=True`` it is formatted to::
110+
111+
*** Test Cases ***
112+
Test Password Policy Minimum Length Input Errors
113+
[Timeout] 10 min
114+
[Tags] tag tag
115+
Log ${argument_name}
116+
Perform Action And Wait ${argument_name}

docs/releasenotes/4.6.0.rst

Lines changed: 0 additions & 101 deletions
This file was deleted.

docs/releasenotes/unreleased/transformers.1.rst

Lines changed: 0 additions & 34 deletions
This file was deleted.

docs/releasenotes/unreleased/transformers.2.rst

Lines changed: 0 additions & 15 deletions
This file was deleted.

docs/releasenotes/unreleased/transformers.3.rst

Lines changed: 0 additions & 37 deletions
This file was deleted.

robotidy/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "4.12.0"
1+
__version__ = "4.13.0"

0 commit comments

Comments
 (0)