mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-07 16:44:27 +01:00
feat: renamed vars:req,res as vars:pre-request,post-response
This commit is contained in:
parent
dc03b6a761
commit
d2227b2b05
@ -65,8 +65,8 @@ const grammar = ohm.grammar(`Bru {
|
||||
query = "query" dictionary
|
||||
|
||||
varsandassert = varsreq | varsres | assert
|
||||
varsreq = "vars:req" dictionary
|
||||
varsres = "vars:res" dictionary
|
||||
varsreq = "vars:pre-request" dictionary
|
||||
varsres = "vars:post-response" dictionary
|
||||
assert = "assert" dictionary
|
||||
|
||||
body = "body" st* "{" nl* textblock tagend
|
||||
|
@ -149,7 +149,7 @@ ${indentString(body.xml)}
|
||||
const varsLocalEnabled = _.filter(reqvars, (v) => v.enabled && v.local);
|
||||
const varsLocalDisabled = _.filter(reqvars, (v) => !v.enabled && v.local);
|
||||
|
||||
bru += `vars:req {`;
|
||||
bru += `vars:pre-request {`;
|
||||
|
||||
if(varsEnabled.length) {
|
||||
bru += `\n${indentString(varsEnabled.map(item => `${item.name}: ${item.value}`).join('\n'))}`;
|
||||
@ -175,7 +175,7 @@ ${indentString(body.xml)}
|
||||
const varsLocalEnabled = _.filter(resvars, (v) => v.enabled && v.local);
|
||||
const varsLocalDisabled = _.filter(resvars, (v) => !v.enabled && v.local);
|
||||
|
||||
bru += `vars:res {`;
|
||||
bru += `vars:post-response {`;
|
||||
|
||||
if(varsEnabled.length) {
|
||||
bru += `\n${indentString(varsEnabled.map(item => `${item.name}: ${item.value}`).join('\n'))}`;
|
||||
|
@ -67,12 +67,12 @@ body:graphql:vars {
|
||||
}
|
||||
}
|
||||
|
||||
vars:req {
|
||||
vars:pre-request {
|
||||
departingDate: 2020-01-01
|
||||
~returningDate: 2020-01-02
|
||||
}
|
||||
|
||||
vars:res {
|
||||
vars:post-response {
|
||||
token: $res.body.token
|
||||
@orderNumber: $res.body.orderNumber
|
||||
~petId: $res.body.id
|
||||
|
Loading…
Reference in New Issue
Block a user