-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
117 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
:orphan: | ||
|
||
============== | ||
Robotidy 4.13.0 | ||
============== | ||
|
||
Release dedicated ``AlignKeywordsSection`` and ``AlignTestCasesSection`` transformers. | ||
|
||
You can install the latest available version by running | ||
|
||
:: | ||
|
||
pip install --upgrade robotframework-tidy | ||
|
||
or to install exactly this version | ||
|
||
:: | ||
|
||
pip install robotframework-tidy==4.13.0 | ||
|
||
.. contents:: | ||
:depth: 2 | ||
:local: | ||
|
||
|
||
Transformers changes | ||
==================== | ||
|
||
Aligning test cases with [Template] (#657) | ||
------------------------------------------ | ||
|
||
Robotidy now aligns test cases with ``[Template]``. It is done by ``AlignTestCasesSection``. | ||
|
||
Note that there is also ``AlignTemplatedTestCases`` which uses completely different approach for aligning test cases | ||
and only supports suites with ``Test Template`` setting. | ||
|
||
Previously, following code:: | ||
|
||
*** Test Cases *** | ||
Testing Random List | ||
[Template] Validate Random List Selection | ||
${SIMPLE LIST} 2 | ||
${MIXED LIST} 3 | ||
${NESTED LIST} 4 | ||
|
||
would not be aligned and would be formatted to:: | ||
|
||
*** Test Cases *** | ||
Testing Random List | ||
[Template] Validate Random List Selection | ||
${SIMPLE LIST} 2 | ||
${MIXED LIST} 3 | ||
${NESTED LIST} 4 | ||
|
||
Now test cases with ``[Template]`` are formatted properly:: | ||
|
||
*** Test Cases *** | ||
Testing Random List | ||
[Template] Validate Random List Selection | ||
${SIMPLE LIST} 2 | ||
${MIXED LIST} 3 | ||
${NESTED LIST} 4 | ||
|
||
Align comments in AlignKeywordsSection and AlignTestCasesSection (#657) | ||
----------------------------------------------------------------------- | ||
|
||
It is now possible to align lines with comments in ``AlignKeywordsSection`` and ``AlignTestCasesSection`` | ||
transformers. Enable it by configuring ``align_comments`` parameter to ``True``. | ||
|
||
It is especially useful if you want to use comments to name the aligned columns. For example:: | ||
|
||
*** Test Cases *** | ||
Testing Random List | ||
[Template] Validate Random List Selection | ||
# collection nbr items | ||
${SIMPLE LIST} 2 # first test | ||
${MIXED LIST} 3 # second test | ||
${NESTED LIST} 4 # third test | ||
|
||
Align settings separately in AlignKeywordsSection and AlignTestCasesSection (#657) | ||
---------------------------------------------------------------------------------- | ||
|
||
It is now possible to align settings separately from rest of the code in keyword / test case. Configure it | ||
using ``align_settings_separately`` parameter:: | ||
|
||
robotidy -c AlignKeywordsSection:align_settings_separately=True src | ||
robotidy -c AlignTestCasesSection:align_settings_separately=True src | ||
|
||
Since this type of alignment depends on the width of the column it only works together with ``auto`` alignment type. | ||
|
||
For example following code:: | ||
|
||
*** Test Cases *** | ||
Test Password Policy Minimum Length Input Errors | ||
[Timeout] 10 min | ||
[Tags] tag tag | ||
Log ${argument_name} | ||
Perform Action And Wait For Result ${argument_name} | ||
|
||
It is by default (with ``alignment_type=auto`` and ``align_settings_separately=False``) formatted to:: | ||
|
||
*** Test Cases *** | ||
Test Password Policy Minimum Length Input Errors | ||
[Timeout] 10 min | ||
[Tags] tag tag | ||
Log ${argument_name} | ||
Perform Action And Wait For Result ${argument_name} | ||
|
||
With ``alignment_type=auto`` and ``align_settings_separately=True`` it is formatted to:: | ||
|
||
*** Test Cases *** | ||
Test Password Policy Minimum Length Input Errors | ||
[Timeout] 10 min | ||
[Tags] tag tag | ||
Log ${argument_name} | ||
Perform Action And Wait ${argument_name} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "4.12.0" | ||
__version__ = "4.13.0" |