Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the replacement of
TableEntry
.Let's consider the previous data for table entry - the idea is to store every item of the table body as a
DataItem
in theDataCollectionEntry
. Every item also contains a list of labels that brings additional semantic. In our case the labels represent the headers - both row header the column header - this is the reason for the list of labels. Every label may also contain some parent label - a solution for a colspan.As the new entry contains a list of data items with associated labels it could be quite difficult to parse it. This is the reason why I have introduced a new method for all Entries:
outputEntry()
In the case of
DataCollectionEntry
the methodoutputEntry()
transforms all data items and labels, so the data are sorted and divided by the specified labels.Unfortunately, there is one open question - if we used this way of transforming
DataCollectionEntry
then when oneDataItem
has more labels we need would need to create some hierarchy the labels setting them as parent labels. In other words - which label (first or second one) should be set as parent label of the other one.Currently, I take the second label and set it as the highest parent label of the first one. Then it take third and set is as highest parent label of the first one (on top of the already added second label) etc... https://github.com/arquillian/arquillian-reporter/compare/master...MatousJobanek:data-structure?expand=1#diff-ef67db943c19836a7a3a82d233c88b8dR52
But I'm not sure if this can be applied in all cases...
The JSON for this table:
would be: