23 lines
755 B
TypeScript
23 lines
755 B
TypeScript
import { When } from '@cucumber/cucumber'
|
|
import type { PerausetWorld } from '../support/world.js'
|
|
|
|
When('I create a meal service of type {string} on {string} with headcount {int}', async function (this: PerausetWorld, serviceType: string, serviceDate: string, plannedHeadcount: number) {
|
|
await this.post('/kitchen/meal-services', {
|
|
serviceType,
|
|
serviceDate,
|
|
plannedHeadcount,
|
|
})
|
|
})
|
|
|
|
When('I list meal services', async function (this: PerausetWorld) {
|
|
await this.get('/kitchen/meal-services')
|
|
})
|
|
|
|
When('I upsert my dietary profile as vegan with nut allergy', async function (this: PerausetWorld) {
|
|
await this.put('/kitchen/dietary-profile', {
|
|
isVegan: true,
|
|
hasNutAllergy: true,
|
|
allergyNotes: 'Severe nut allergy',
|
|
})
|
|
})
|