-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transformer doesn't convert "[empty]" values in the table to empty string ("") #2262
Comments
Hi @manish7-thakur, can you provide us the One thing to note though is that TBH I've rarely see any use of the |
For the |
Right, didn't think about that! Thanks @mpkorstanje |
@gaeljw
|
Well I have tried But nothing seems to work out. If you say that return type should be At the moment I have to work around this issue with:
|
I would need to check the code of Cucumber core to be 100% sure but I believe transformers are not applied when you access the Transformers are applied when you use for instance: dataTable.asLists[String](classOf[String]) // java.util.List[java.util.List[String]]
// Or
dataTable.asScalaRawLists[String] // Seq[Seq[String]] |
But I think transformation is applied while creating the |
The transformers are only applied when the data table is converted into something else. The idea being that you use a list of transformed objects rather then a data table. Then("""^The search result should match following expected value$""") {
(cancelationPolicyResults: Seq[CancelationPolicyResult]) => ...
} Or if you use it on a list of strings, that you use a list of strings instead. Then("""^The search result should match following expected value$""") {
(cancelationPolicyResults: Seq[Seq[String]]) => ...
} |
It would make sense for all |
@mpkorstanje @gaeljw Thanks for clarifying this point. I was under the impression that transformers are applied while creating the |
Describe the bug
Updated to version
6.10.0
recently and went through the documentationhttps://github.com/cucumber/cucumber-jvm-scala/blob/main/docs/transformers.md
but seems like none of the registered transformers for empty values in being used during the transformation. Not sure at what stage the transformer is called or if I'm doing something wrong.Registered the transformer defined as:
and can see it's being registered (see attached screenshot) with glue but after transformation the
DataTable
values are still coming out to be[empty]
.To Reproduce
Steps to reproduce the behavior.
Step is defined as:
Expected behavior
I expected the cells in features marked with
[empty
would be converted to""
against which result can be validated.Versions:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: