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,49 @@
import { When } from '@cucumber/cucumber'
import type { PerausetWorld } from '../support/world.js'
When('I create an inventory item {string} with unit {string} quantity {int} and minimum {int}', async function (this: PerausetWorld, name: string, unit: string, currentQuantity: number, minimumQuantity: number) {
await this.post('/inventory', {
name,
unit,
currentQuantity,
minimumQuantity,
category: 'kitchen',
})
})
When('I update the inventory item with name {string}', async function (this: PerausetWorld, name: string) {
const itemId = (this as any).itemId
await this.put(`/inventory/${itemId}`, {
itemId,
name,
})
})
When('I list inventory items', async function (this: PerausetWorld) {
await this.get('/inventory')
})
When('I request inventory for item with quantity {int} unit {string} and purpose {string}', async function (this: PerausetWorld, quantity: number, unit: string, purpose: string) {
const itemId = (this as any).itemId
await this.post('/inventory/requests', {
itemId,
quantity,
unit,
purpose,
})
})
When('I review the inventory request with status {string}', async function (this: PerausetWorld, status: string) {
const requestId = (this as any).requestId
await this.post(`/inventory/requests/${requestId}/review`, {
requestId,
status,
})
})
When('I fulfill the inventory request', async function (this: PerausetWorld) {
const requestId = (this as any).requestId
await this.post(`/inventory/requests/${requestId}/fulfill`, {
requestId,
})
})