Skip to content

Commit

Permalink
Release 4.13.0 (#697)
Browse files Browse the repository at this point in the history
  • Loading branch information
bhirsz authored May 20, 2024
1 parent 6272c29 commit 5145e50
Show file tree
Hide file tree
Showing 6 changed files with 117 additions and 188 deletions.
116 changes: 116 additions & 0 deletions docs/releasenotes/4.13.0.rst
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}
101 changes: 0 additions & 101 deletions docs/releasenotes/4.6.0.rst

This file was deleted.

34 changes: 0 additions & 34 deletions docs/releasenotes/unreleased/transformers.1.rst

This file was deleted.

15 changes: 0 additions & 15 deletions docs/releasenotes/unreleased/transformers.2.rst

This file was deleted.

37 changes: 0 additions & 37 deletions docs/releasenotes/unreleased/transformers.3.rst

This file was deleted.

2 changes: 1 addition & 1 deletion robotidy/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "4.12.0"
__version__ = "4.13.0"

0 comments on commit 5145e50

Please sign in to comment.