File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
src/main/java/com/pdsl/gherkin/models Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 6
6
7
7
<groupId >com.google.pdsl</groupId >
8
8
<artifactId >pdsl</artifactId >
9
- <version >1.11.1 </version >
9
+ <version >1.11.2-SNAPSHOT </version >
10
10
11
11
<name >pdsl</name >
12
12
<url >http://www.github.com/google/polymorphicDSL</url >
Original file line number Diff line number Diff line change 1
1
package com .pdsl .gherkin .models ;
2
2
3
3
import java .util .*;
4
+ import java .util .stream .Collectors ;
4
5
5
6
public class GherkinStep {
6
7
@@ -51,7 +52,17 @@ public String getFullRawStepText() {
51
52
if (docString .isPresent ()) {
52
53
str .append (docString .get ().getGherkinString ().getRawString ());
53
54
} else if (dataTable .isPresent ()) {
54
- str .append (dataTable .get ().toString ());
55
+ StringBuilder tableAsString = new StringBuilder ();
56
+ // Reconstruct the cell data back into gherkin
57
+ for (List <GherkinString > row : dataTable .get ()) {
58
+ tableAsString .append ("|" ); // Add leading pipe
59
+ String rowAsString = row .stream ()
60
+ .map (GherkinString ::getRawString )
61
+ .collect (Collectors .joining ("|" ));
62
+ tableAsString .append (rowAsString );
63
+ tableAsString .append (String .format ("|%n" )); // Add ending pipe with a newline
64
+ }
65
+ str .append (tableAsString );
55
66
}
56
67
return str .toString ();
57
68
}
You can’t perform that action at this time.
0 commit comments