Skip to content

Commit ec691b9

Browse files
committed
feat: scenario to test the fix
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 39de56b commit ec691b9

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

features/test.feature

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,29 @@ Feature: Test this extension
111111
| key | value |
112112
| data | [{"foo":"<FIELD_FOO>"}] |
113113

114+
Scenario: Test placeholder decode keeps numeric types in complex payload
115+
When set the response to:
116+
"""
117+
{
118+
"primaryId": 639,
119+
"secondaryId": 690
120+
}
121+
"""
122+
And sending "POST" to "/"
123+
And fetch field "(PRIMARY_ID)primaryId" from previous JSON response
124+
And fetch field "(SECONDARY_ID)secondaryId" from previous JSON response
125+
And sending "PATCH" to "/"
126+
| items | [{"kind":"entry","metrics":{"index":1,"size":350,"offset":166},"primaryId":<PRIMARY_ID>,"secondaryId":<SECONDARY_ID>}] |
127+
Then the response should be a JSON array with the following mandatory values
128+
| key | value |
129+
| (jq).items[0].metrics.index | 1 |
130+
| (jq).items[0].metrics.size | 350 |
131+
| (jq).items[0].primaryId | 639 |
132+
| (jq).items[0].secondaryId | 690 |
133+
| (jq).items[0].metrics.index | (jq)type == "number" |
134+
| (jq).items[0].primaryId | (jq)type == "number" |
135+
| (jq).items[0].secondaryId | (jq)type == "number" |
136+
114137
Scenario: Test initial state with string
115138
When set the response to:
116139
"""

0 commit comments

Comments
 (0)