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,59 @@
import { When } from '@cucumber/cucumber'
import type { PerausetWorld } from '../support/world.js'
When('I create a retreat {string} with slug {string} from {string} to {string}', async function (this: PerausetWorld, name: string, slug: string, startAt: string, endAt: string) {
await this.post('/retreats', {
slug,
name,
startAt,
endAt,
})
})
When('I list retreats', async function (this: PerausetWorld) {
await this.get('/retreats')
})
When('I update the retreat with name {string} and capacity {int}', async function (this: PerausetWorld, name: string, capacity: number) {
const retreatId = (this as any).retreatId
await this.put(`/retreats/${retreatId}`, {
retreatId,
name,
capacity,
})
})
When('I publish the retreat', async function (this: PerausetWorld) {
const retreatId = (this as any).retreatId
await this.post(`/retreats/${retreatId}/publish`, {
retreatId,
})
})
When('I add a person {string} with role {string} to the retreat', async function (this: PerausetWorld, fullName: string, roleType: string) {
const retreatId = (this as any).retreatId
await this.post(`/retreats/${retreatId}/persons`, {
retreatId,
fullName,
roleType,
email: `${fullName.toLowerCase().replace(/\s+/g, '.')}@test.org`,
})
})
When('I add a schedule item {string} from {string} to {string} at {string}', async function (this: PerausetWorld, title: string, startsAt: string, endsAt: string, location: string) {
const retreatId = (this as any).retreatId
await this.post(`/retreats/${retreatId}/schedule`, {
retreatId,
title,
startsAt,
endsAt,
location,
})
})
When('I cancel the retreat', async function (this: PerausetWorld) {
const retreatId = (this as any).retreatId
await this.post(`/retreats/${retreatId}/cancel`, {
retreatId,
})
})