gauge-java
gauge-java copied to clipboard
Cannot use pipe which has wrapped with double quotes ("|") for a table in spec file
Expected behavior
Should be able to use pipe which has wrapped with double quotes ("|") for a table in spec file
Actual behavior
Cannot use pipe which has wrapped with double quotes ("|") for a table in spec file
Steps to reproduce
- Write a java method for a data driven test
- In the spec table provide pipe symbol (|) Ex:
- And the JSON Path Assertions for the response should be equal to the following
JSON Path Value $.message error.validation $.description null $.fieldErrors[0].objectName $.fieldErrors[0].field question.media $.fieldErrors[0].message must match \"TEXT
- Try to run
- It will only take the string before the pipe symbol.
Gauge version
Gauge version: 0.9. Commit Hash: 724e6d
Plugins
csharp (0.10.1) flash (0.0.1) html-report (4.0.2) java (0.6.5) ruby (0.4.2) screenshot (0.0.1) spectacle (0.1.2) xml-report (0.2.0)
Can you try changing that line to
|$.fieldErrors[0].message |must match "TEXT \|HTML \|IMAGE \|VIDEO \|AUDIO" |
Escape character will solve this problem. However formatting the spec removes the escape character - https://github.com/getgauge/gauge/issues/318. The problem will then re-occur.