Initial commit
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
meta {
|
||||
name: 3 Preview Batch - With Envelope
|
||||
type: http
|
||||
seq: 3
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{baseUrl}}/api/preview/batch
|
||||
body: json
|
||||
auth: none
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"sessionId": "{{sessionId}}",
|
||||
"batchIndex": 0,
|
||||
"forceRegenerate": false,
|
||||
"config": {
|
||||
"font": "alva",
|
||||
"letters": [
|
||||
{
|
||||
"index": 0,
|
||||
"format": "a6p",
|
||||
"text": "Liebe [[Vorname]],\n\nvielen Dank für deine Bestellung!\n\nHerzliche Grüße",
|
||||
"placeholders": {
|
||||
"Vorname": "Anna",
|
||||
"Nachname": "Schmidt",
|
||||
"Strasse": "Bahnhofstr. 5",
|
||||
"PLZ": "80331",
|
||||
"Ort": "München"
|
||||
}
|
||||
}
|
||||
],
|
||||
"envelopes": [
|
||||
{
|
||||
"index": 0,
|
||||
"format": "c6",
|
||||
"type": "recipient",
|
||||
"data": {
|
||||
"Vorname": "Anna",
|
||||
"Nachname": "Schmidt",
|
||||
"Strasse": "Bahnhofstr. 5",
|
||||
"PLZ": "80331",
|
||||
"Ort": "München"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tests {
|
||||
test("Returns letter and envelope", function() {
|
||||
const files = res.body.files;
|
||||
const hasLetter = files.some(f => f.type === "letter");
|
||||
const hasEnvelope = files.some(f => f.type === "envelope");
|
||||
expect(hasLetter).to.be.true;
|
||||
expect(hasEnvelope).to.be.true;
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user