chore: perauset customer project

This commit is contained in:
e2e
2026-07-11 08:35:02 +02:00
commit 1b5783d507
293 changed files with 28412 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
import { When, Then } from '@cucumber/cucumber'
import { strict as assert } from 'assert'
import type { PerausetWorld } from '../support/world.js'
When('I send a POST request to {string} with body:', async function (this: PerausetWorld, path: string, body: string) {
await this.post(path, JSON.parse(body))
})
Then('I store the response field {string} as {string}', function (this: PerausetWorld, field: string, key: string) {
assert.ok(this.lastBody, 'No response body')
const value = this.lastBody[field]
assert.ok(value !== undefined && value !== null, `Response body field "${field}" is missing. Body: ${JSON.stringify(this.lastBody)}`)
;(this as any)[key] = value
})
Then('the response body field {string} should be truthy', function (this: PerausetWorld, field: string) {
assert.ok(this.lastBody, 'No response body')
assert.ok(this.lastBody[field], `Expected body.${field} to be truthy, got: ${JSON.stringify(this.lastBody[field])}`)
})