From ad03a47ed874cac7cfcb77d8a69cf3823c81040e Mon Sep 17 00:00:00 2001 From: OpenClaw Date: Sat, 7 Mar 2026 00:15:33 +0000 Subject: [PATCH] fix(#26): Erstelle End-to-End Happy-Path Demo-Script --- demo-happy-path.sh | 68 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 demo-happy-path.sh diff --git a/demo-happy-path.sh b/demo-happy-path.sh new file mode 100644 index 0000000..708eca7 --- /dev/null +++ b/demo-happy-path.sh @@ -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." \ No newline at end of file