fix(#26): Erstelle End-to-End Happy-Path Demo-Script
Some checks are pending
Docker Test / test (push) Waiting to run
Some checks are pending
Docker Test / test (push) Waiting to run
This commit is contained in:
parent
10957fce65
commit
ad03a47ed8
1 changed files with 68 additions and 0 deletions
68
demo-happy-path.sh
Normal file
68
demo-happy-path.sh
Normal file
|
|
@ -0,0 +1,68 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# End-to-End Happy-Path Demo-Script
|
||||||
|
# Ziel: Registrierung -> Request -> Offer -> Deal -> Review
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "Starte Happy-Path Demo..."
|
||||||
|
|
||||||
|
# 1. Registrierung
|
||||||
|
echo "1. Registrierung"
|
||||||
|
curl -X POST http://localhost:3000/api/auth/register \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"name": "Demo User",
|
||||||
|
"email": "demo@example.com",
|
||||||
|
"password": "demopassword123"
|
||||||
|
}' | jq .
|
||||||
|
|
||||||
|
# 2. Login
|
||||||
|
echo "2. Login"
|
||||||
|
curl -X POST http://localhost:3000/api/auth/login \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"email": "demo@example.com",
|
||||||
|
"password": "demopassword123"
|
||||||
|
}' | jq .
|
||||||
|
|
||||||
|
# 3. Request erstellen
|
||||||
|
echo "3. Request erstellen"
|
||||||
|
curl -X POST http://localhost:3000/api/requests \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"title": "Hilfe bei Gartenarbeit",
|
||||||
|
"description": "Ich brauche Hilfe beim Rasenmähen.",
|
||||||
|
"category": "garten"
|
||||||
|
}' | jq .
|
||||||
|
|
||||||
|
# 4. Offer anbieten
|
||||||
|
echo "4. Offer anbieten"
|
||||||
|
curl -X POST http://localhost:3000/api/offers \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"requestId": "REQUEST_ID",
|
||||||
|
"description": "Ich helfe gerne mit.",
|
||||||
|
"price": 20
|
||||||
|
}' | jq .
|
||||||
|
|
||||||
|
# 5. Deal akzeptieren
|
||||||
|
echo "5. Deal akzeptieren"
|
||||||
|
curl -X POST http://localhost:3000/api/deals \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"offerId": "OFFER_ID",
|
||||||
|
"requestId": "REQUEST_ID"
|
||||||
|
}' | jq .
|
||||||
|
|
||||||
|
# 6. Review abgeben
|
||||||
|
echo "6. Review abgeben"
|
||||||
|
curl -X POST http://localhost:3000/api/reviews \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"dealId": "DEAL_ID",
|
||||||
|
"rating": 5,
|
||||||
|
"comment": "Sehr gute Hilfe!"
|
||||||
|
}' | jq .
|
||||||
|
|
||||||
|
echo "Happy-Path Demo abgeschlossen."
|
||||||
Loading…
Add table
Add a link
Reference in a new issue