Skip to content
This repository was archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
Correct gherkin indentation for embedded strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark committed Mar 29, 2019
1 parent f3813f6 commit a0ae2ed
Show file tree
Hide file tree
Showing 5 changed files with 1,182 additions and 1,174 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -825,21 +825,21 @@ Feature: User can create data across multiple fields for all combinations availa
| "other" |
| "Not in If" |
And there is a constraint:
"""
{
"if": { "field": "foo2", "is": "equalTo", "value": 1 },
"then": { "field": "foo3", "is": "equalTo", "value": "test1" },
"else": {
"if": { "field": "foo2", "is": "equalTo", "value": 10 },
"then": { "field": "foo3", "is": "equalTo", "value": "test10" },
"else": {
"if": { "field": "foo2", "is": "equalTo", "value": 100 },
"then": { "field": "foo3", "is": "equalTo", "value": "test100" },
"else": { "field": "foo3", "is": "equalTo", "value": "other" }
}
}
}
"""
"""
{
"if": { "field": "foo2", "is": "equalTo", "value": 1 },
"then": { "field": "foo3", "is": "equalTo", "value": "test1" },
"else": {
"if": { "field": "foo2", "is": "equalTo", "value": 10 },
"then": { "field": "foo3", "is": "equalTo", "value": "test10" },
"else": {
"if": { "field": "foo2", "is": "equalTo", "value": 100 },
"then": { "field": "foo3", "is": "equalTo", "value": "test100" },
"else": { "field": "foo3", "is": "equalTo", "value": "other" }
}
}
}
"""
Then the following data should be generated:
| foo1 | foo2 | foo3 |
| "alpha" | 1 | "test1" |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2100,12 +2100,12 @@ Feature: User can specify that a field value belongs to a set of predetermined o
Scenario: Running a 'inSet' request as part of a non-contradicting anyOf constraint should be successful
Given there is a field foo
And there is a constraint:
"""
{ "anyOf": [
{ "field": "foo", "is": "inSet", "values": [ "Test 1", "Test 2" ] },
{ "field": "foo", "is": "inSet", "values": [ "Test 3", "Test 4" ] }
]}
"""
"""
{ "anyOf": [
{ "field": "foo", "is": "inSet", "values": [ "Test 1", "Test 2" ] },
{ "field": "foo", "is": "inSet", "values": [ "Test 3", "Test 4" ] }
]}
"""
Then the following data should be generated:
| foo |
| null |
Expand All @@ -2117,12 +2117,12 @@ Feature: User can specify that a field value belongs to a set of predetermined o
Scenario: Running a 'inSet' request as part of a non-contradicting allOf constraint should be successful
Given there is a field foo
And there is a constraint:
"""
{ "allOf": [
{ "field": "foo", "is": "inSet", "values": [ "Test1", "Test2" ] },
{ "field": "foo", "is": "inSet", "values": [ "Test1", "Test2" ] }
]}
"""
"""
{ "allOf": [
{ "field": "foo", "is": "inSet", "values": [ "Test1", "Test2" ] },
{ "field": "foo", "is": "inSet", "values": [ "Test1", "Test2" ] }
]}
"""
Then the following data should be generated:
| foo |
| null |
Expand All @@ -2132,12 +2132,12 @@ Feature: User can specify that a field value belongs to a set of predetermined o
Scenario: Running a 'inSet' request as part of a contradicting allOf constraint should produce null
Given there is a field foo
And there is a constraint:
"""
{ "allOf": [
{ "field": "foo", "is": "inSet", "values": [ "Test1", "Test2" ] },
{ "field": "foo", "is": "inSet", "values": [ "Test3", "Test4" ] }
]}
"""
"""
{ "allOf": [
{ "field": "foo", "is": "inSet", "values": [ "Test1", "Test2" ] },
{ "field": "foo", "is": "inSet", "values": [ "Test3", "Test4" ] }
]}
"""
Then the following data should be generated:
| foo |
| null |
Expand All @@ -2153,13 +2153,13 @@ Feature: User can specify that a field value belongs to a set of predetermined o
| "Test3" |
| "Test4" |
And there is a constraint:
"""
{
"if": { "field": "foo", "is": "inSet", "values": [ "Test1", "Test2" ] },
"then": { "field": "price", "is": "equalTo", "value": 1 },
"else": { "field": "price", "is": "equalTo", "value": 2 }
}
"""
"""
{
"if": { "field": "foo", "is": "inSet", "values": [ "Test1", "Test2" ] },
"then": { "field": "price", "is": "equalTo", "value": 1 },
"else": { "field": "price", "is": "equalTo", "value": 2 }
}
"""
And foo is anything but null
And price is anything but null
Then the following data should be generated:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ Feature: User can specify that data must be created to conform to each of multip
Scenario: Running an 'allOf' request that contains a valid nested allOf request should be successful
Given there is a field foo
And there is a constraint:
"""
{ "allOf": [
{ "allOf": [
{ "field": "foo", "is": "matchingRegex", "value": "[a-b]{2}" },
{ "field": "foo", "is": "ofLength", "value": 2 }
]},
{ "field": "foo", "is": "ofType", "value": "string" }
]}
"""
"""
{ "allOf": [
{ "allOf": [
{ "field": "foo", "is": "matchingRegex", "value": "[a-b]{2}" },
{ "field": "foo", "is": "ofLength", "value": 2 }
]},
{ "field": "foo", "is": "ofType", "value": "string" }
]}
"""
Then the following data should be generated:
| foo |
| "aa" |
Expand All @@ -28,15 +28,15 @@ Feature: User can specify that data must be created to conform to each of multip
Given there is a field foo
And foo is of type "string"
And there is a constraint:
"""
{ "allOf": [
{ "anyOf": [
{ "field": "foo", "is": "ofLength", "value": 1 },
{ "field": "foo", "is": "ofLength", "value": 2 }
]},
{ "field": "foo", "is": "matchingRegex", "value": "[1]{1,2}" }
]}
"""
"""
{ "allOf": [
{ "anyOf": [
{ "field": "foo", "is": "ofLength", "value": 1 },
{ "field": "foo", "is": "ofLength", "value": 2 }
]},
{ "field": "foo", "is": "matchingRegex", "value": "[1]{1,2}" }
]}
"""
Then the following data should be generated:
| foo |
| "1" |
Expand All @@ -46,15 +46,15 @@ Feature: User can specify that data must be created to conform to each of multip
Scenario: Running an 'allOf' request that contains an invalid nested allOf request should generate null
Given there is a field foo
And there is a constraint:
"""
{ "allOf": [
{ "allOf": [
{"field": "foo", "is": "matchingRegex", "value": "[a-k]{3}" },
{"field": "foo", "is": "matchingRegex", "value": "[1-5]{3}" }
]},
{ "field": "foo", "is": "ofType", "value": "string" }
]}
"""
"""
{ "allOf": [
{ "allOf": [
{"field": "foo", "is": "matchingRegex", "value": "[a-k]{3}" },
{"field": "foo", "is": "matchingRegex", "value": "[1-5]{3}" }
]},
{ "field": "foo", "is": "ofType", "value": "string" }
]}
"""
Then the following data should be generated:
| foo |
| null |
Expand All @@ -66,16 +66,16 @@ Feature: User can specify that data must be created to conform to each of multip
| 5 |
| "ack" |
And there is a constraint:
"""
{ "allOf": [
{ "anyOf": [
{"field": "foo", "is": "matchingRegex", "value": "[a-z]{3}" },
{"field": "foo", "is": "matchingRegex", "value": "[a-k]{3}" }
]},
{ "field": "foo", "is": "ofType", "value": "integer" },
{ "field": "foo", "is": "equalTo", "value": 5}
]}
"""
"""
{ "allOf": [
{ "anyOf": [
{"field": "foo", "is": "matchingRegex", "value": "[a-z]{3}" },
{"field": "foo", "is": "matchingRegex", "value": "[a-k]{3}" }
]},
{ "field": "foo", "is": "ofType", "value": "integer" },
{ "field": "foo", "is": "equalTo", "value": 5 }
]}
"""
Then the following data should be generated:
| foo |
| 5 |
Expand All @@ -85,12 +85,12 @@ Feature: User can specify that data must be created to conform to each of multip
Given there is a field foo
And foo is of type "string"
And there is a constraint:
"""
{ "allOf": [
{ "field": "foo", "is": "equalTo", "value": "Test01" },
{ "field": "foo", "is": "equalTo", "value": "Test01" }
]}
"""
"""
{ "allOf": [
{ "field": "foo", "is": "equalTo", "value": "Test01" },
{ "field": "foo", "is": "equalTo", "value": "Test01" }
]}
"""
Then the following data should be generated:
| foo |
| null |
Expand All @@ -99,12 +99,12 @@ Feature: User can specify that data must be created to conform to each of multip
Scenario: User attempts to combine two constraints that only intersect at the empty set within an allOf operator should generate null
Given there is a field foo
And there is a constraint:
"""
"""
{ "allOf": [
{ "field": "foo", "is": "equalTo", "value": "Test0" },
{ "field": "foo", "is": "equalTo", "value": 5 }
{ "field": "foo", "is": "equalTo", "value": "Test0" },
{ "field": "foo", "is": "equalTo", "value": 5 }
]}
"""
"""
Then the following data should be generated:
| foo |
| null |
| null |
Loading

0 comments on commit a0ae2ed

Please sign in to comment.