n-shinde / PeakPeeps

Group Project for CSC 365
0 stars 0 forks source link

Test results Krishnanshu Gupta #20

Open Krishnanshu-Gupta opened 7 months ago

Krishnanshu-Gupta commented 7 months ago
  1. Cal Poly Student

Steve is a 3rd year Cal Poly physics major in desperate need of getting out of the lab. He heard from his friend Dave about this new app Peak Peeps that allows them to connect and see each other's favorite outdoor routes. When he first downloads the app, he calls /socials/add on the username Biker_Dave, his friend Dave’s account.

While Steve waits for Dave to accept his request, he already knows of his favorite secret biking route that he wants to add to the site, especially to share with Dave and his other biker friends. He calls /routes/add and passes in the parameters: name, location, coordinates, length_in_miles, difficulty, and activities.

The next day, Steve is bored and wants to go for a hike that he’s never tried before. Since he is still lacking many friends on the app, he decides to check out the popular routes with /routes/popular and decides to only filter by activities as he’s looking for a hike. He finds one he likes and heads out for the adventure of the day. Afterwards, he marks that he logged this hike, causing the app to call /peepcoins/add to add a balance to his account.

A couple months later, Steve’s activity on the app has skyrocketed. Since he’s attending school in the area, he’s able to log many hours accomplishing trails nearby. As a result, his stock of Peep Coins has also skyrocketed, enough to purchase a coupon. Conveniently, there is currently a coupon to Old SLO BBQ co available, his favorite BBQ restaurant. He quickly calls /peepcoins/purchase/coupon to trade his Peep Coins in for the coupon, and he’s set for dinner tonight.

Steve creates an account

curl -X 'POST' \
  'https://peak-peeps.onrender.com/users/create_account' \
  -H 'accept: application/json' \
  -H 'access_token: PeepCoins123!' \
  -H 'Content-Type: application/json' \
  -d '{
  "username": "Steve"
}'

Response:
"OK"

Adds friend Dave

curl -X 'POST' \
  'https://peak-peeps.onrender.com/users/follow' \
  -H 'accept: application/json' \
  -H 'access_token: PeepCoins123!' \
  -H 'Content-Type: application/json' \
  -d '{
  "user_requesting_follow": {
    "username": "Steve"
  },
  "other_user": {
    "username": "Dave"
  }
}'

Response:
"OK"

Adds route

curl -X 'POST' \
  'https://peak-peeps.onrender.com/routes/add' \
  -H 'accept: application/json' \
  -H 'access_token: PeepCoins123!' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Steve'\''s route",
  "user_id": 2,
  "location": "Bishop",
  "coordinates": [
    35, -120
  ],
  "length": 2.2,
  "difficulty": 2,
  "activities": "Biking"
}'

Response:
"OK"

Finds a hike and adds coins

curl -X 'GET' \
  'https://peak-peeps.onrender.com/routes/popular' \
  -H 'accept: application/json' \
  -H 'access_token: PeepCoins123!'

Response:
[
  "Steve",
  "Steve",
  "Lucas Pierce",
  "Steve"
]

curl -X 'PUT' \
  'https://peak-peeps.onrender.com/peepcoins/add' \
  -H 'accept: application/json' \
  -H 'access_token: PeepCoins123!' \
  -H 'Content-Type: application/json' \
  -d '{
  "user_id": 2,
  "change": 100
}'

Response: 
"OK"

Purchase coupon

curl -X 'POST' \
  'https://peak-peeps.onrender.com/peepcoins/purchase/coupon' \
  -H 'accept: application/json' \
  -H 'access_token: PeepCoins123!' \
  -H 'Content-Type: application/json' \
  -d '{
  "coupon_id": 0,
  "user_id": 2
}'

Response:
Internal Server Error
Krishnanshu-Gupta commented 7 months ago
  1. SLO Visitor

Victor, a busy software engineer at Apple, during one long weekend decides to come to SLO because he has heard of many cool sites to see from his co-workers. After a 3 hour drive, he finally arrives in SLO, but doesn’t know which sites to see and try first. He then remembered an app called Peak Peeps, which helps find sites/routes to try that one of his-coworkers mentioned. So, he downloaded Peak Peeps from the App Store. First, Victor requests to view popular routes to see which are the best routes to try by calling GET /routes/popular. Victor sees that there are 3 routes with a high “popularity_index” and 9 “five_star_reviews”.

A couple minutes later, he decided to go with one of the 3 routes that was close to his hotel as described by the “location” attribute.

After he completed the route, he was amazed by the scenery and wanted to leave a review. So, he called POST /reviews/new and entered his username/name and the “rating” for that route.

Popular routes:

curl -X 'GET' \
  'https://peak-peeps.onrender.com/routes/popular' \
  -H 'accept: application/json' \
  -H 'access_token: PeepCoins123!'

Response:
[
  "Steve",
  "Steve",
  "Lucas Pierce",
  "Steve"
]

Writes a review

curl -X 'POST' \
  'https://peak-peeps.onrender.com/reviews/add' \
  -H 'accept: application/json' \
  -H 'access_token: PeepCoins123!' \
  -H 'Content-Type: application/json' \
  -d '{
  "user_id": 3,
  "route_id": 2,
  "description": "Great",
  "rating": 4
}'

Response:
Internal Server Error
Krishnanshu-Gupta commented 7 months ago
  1. GateKeeper

Zac, a born-and-raised local in San Luis Obispo (SLO), recently discovered that his favorite retreat, Ebb Tide Beach, had become overcrowded with the general public. Frustrated by the loss of his peaceful haven, Zac embarked on a quest to find a solution. His search led him to "Peak Peeps," an app designed to help users maintain the secrecy of their favorite spots while sharing them exclusively with close friends.

Now, Zac enjoys the company of his inner circle, including Robin, Julia, Nidhi, and Josh, as they explore the scenic trails he has revealed to them. Zac calls /routes/add and enters the name, location, coordinates, length, difficulty, and activities relevant to the route in question. With each shared route, Zac earns PeepCoins, a virtual currency that can be redeemed at local businesses. As he continues uncovering hidden gems in the Central Coast, Zac not only preserves the sanctity of his cherished spots but also supports the community through his PeepCoin ventures. Zac then selects a coupon to purchase, which calls /peepcoins/purchase/coupon, confirming that he has enough money to redeem the deal. As Zac cashes out his coins, he then views his friends' routes to also get an idea of where to hike next to get some more PeepCoins. He calls /routes/friends by entering his friend's username, and now he has more exciting routes to explore!

Adding a route

curl -X 'POST' \
  'https://peak-peeps.onrender.com/routes/add' \
  -H 'accept: application/json' \
  -H 'access_token: PeepCoins123!' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Zac'\''s Schenic route",
  "user_id": 4,
  "location": "Ebb Tide Beach",
  "coordinates": [
    35, -120
  ],
  "length": 1.2,
  "difficulty": 3,
  "activities": "Hiking"
}'

Response:
"OK"

Purchasing a coupon:

curl -X 'POST' \
  'https://peak-peeps.onrender.com/peepcoins/purchase/coupon' \
  -H 'accept: application/json' \
  -H 'access_token: PeepCoins123!' \
  -H 'Content-Type: application/json' \
  -d '{
  "coupon_id": 0,
  "user_id": 4
}'

Response:
Internal Server Error
Krishnanshu-Gupta commented 7 months ago

Krishnanshu Gupta Test 1 Using example workflow 2: Victor decided to extend his trip by a couple of days to do a few more trails in SLO because he had such a great experience with the first one. On the next day, he decided to try another one of Steve's trails, but this time he realizes that the location is completely wrong and instead of going to Bishop, he ended up in Bubblegum Alley. Once he finds the right location himself from Google Maps, he realizes that the trail length and difficulty that Steve mentioned are also wrong. Frustrated and wanting to make sure no one ever makes the mistake of doing this one of Steve's trails again, he decides to report the route.

Getting popular routes:

curl -X 'GET' \
  'https://peak-peeps.onrender.com/routes/popular' \
  -H 'accept: application/json' \
  -H 'access_token: PeepCoins123!'

Response:
[
  "Steve",
  "Steve",
  "Lucas Pierce",
  "Steve"
]

/routes/report

{
  "name": "Victor",
  "user_id": 4,
  "location": "Bishop",
  "coordinates": [
    35, -120
  ],
  "length": 1.2,
  "difficulty": 3,
  "activities": "string"
}

Response:
[
  {
    "report_status": "Reported",
    "flagged": true
  }
]
Krishnanshu-Gupta commented 7 months ago

Krishnanshu Gupta Test 2 Using example workflow 1, once Dave adds Steve back, when Steve goes through his friends' routes, he realizes that Dave is way too advanced and that he won't be able to keep up with them. Feeling disappointed, Steve decided to immediately remove Dave as a follower and just focus on easier routes for now.

/routes/followers - getting Dave's routes

curl -X 'GET' \
  'https://peak-peeps.onrender.com/routes/followers?friend_username=Dave' \
  -H 'accept: application/json' \
  -H 'access_token: PeepCoins123!'

Response:
Internal Server Error

/users/remove_follower - removing Dave

curl -X 'POST' \
  'https://peak-peeps.onrender.com/users/remove_follower' \
  -H 'accept: application/json' \
  -H 'access_token: PeepCoins123!' \
  -H 'Content-Type: application/json' \
  -d '{
  "user_to_update": {
    "username": "Steve"
  },
  "follower_to_remove": {
    "username": "Dave"
  }
}'

Response:
Internal Server Error
Krishnanshu-Gupta commented 7 months ago

Krishnanshu Gupta Test 3 Roxanne's Barrels decides to open up a new location in San Luis Obispo. When she hears of Peak Peeps, she decides to add her business on the app and create coupons. When Steve sees her coupon in the app, he is curious, so he decides to buy the coupon.

/business/add

curl -X 'PUT' \
  'https://peak-peeps.onrender.com/business/add' \
  -H 'accept: application/json' \
  -H 'access_token: PeepCoins123!' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Roxanne'\''s Barrels",
  "address": "1401 SANTA ROSA ST, SAN LUIS OBISPO, CA 93401, USA"
}'

Response: 
"OK"

/coupons/add

{
  "business_id": 0,
  "name": "Roxanne's Barrels Coupon",
  "cost": 5
}

Response:
Internal Server Error

/peepcoins/purchase/coupon

curl -X 'POST' \
  'https://peak-peeps.onrender.com/peepcoins/purchase/coupon' \
  -H 'accept: application/json' \
  -H 'access_token: PeepCoins123!' \
  -H 'Content-Type: application/json' \
  -d '{
  "coupon_id": 0,
  "user_id": 2
}'

Response: 
Internal Server Error