Skip to content

πŸ’ͺ [Enhance]: AssertCsv failure message with arrow ↑ that points to the different cell valueΒ #398

@stijnmoreels

Description

@stijnmoreels

Description

When working with large CSV rows, that have similar values, it could not always be easy to locate the actual difference between expected/actual. The current failure message already shows the different cell value, row number and the entire inputted expected/actual row, but does not visually show where in the row the difference is located (beside the column number).

Solution

A visually attractive solution that would make the failure message even more useful and for testers to more quickly spot the difference, we could add a ASCII ↑ character that points to the different cell value. This should be added in both the expected as well as the actual outputted CSV row.

Expected:
col_1;col_2;col_3
thing;horse;chair
      ↑

Actual:
col_1;col_2;col_3
thing;table;chair
      ↑

Additional context

The change should happen in the CsvTable.GetOriginalRowAtOrAll. We should alter some of the tests that deal with verifying different cell values that the arrow is indeed placed at the right spot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:assertAll issues related to comparing values in testsenhancementNew feature or requestgood first issueGood for newcomers

    Type

    No type

    Projects

    Status

    To do

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions