|
1 |
| -- name: Register |
| 1 | +- title: Register |
2 | 2 | POST: $.env.APIURL/users
|
3 | 3 | headers:
|
4 | 4 | Content-Type: application/json
|
|
11 | 11 | exists: $.resp.json.user.bio
|
12 | 12 | exists: $.resp.json.user.image
|
13 | 13 | exists: $.resp.json.user.token
|
14 |
| -- name: Login |
| 14 | +- title: Login |
15 | 15 | POST: '$.env.APIURL/users/login'
|
16 | 16 | headers:
|
17 | 17 | Content-Type: application/json
|
|
24 | 24 | exists: $.resp.body.json.user.bio
|
25 | 25 | exists: $.resp.body.json.user.image
|
26 | 26 | exists: $.resp.body.json.user.token
|
27 |
| -- name: Login and Remember Token |
| 27 | +- title: Login and Remember Token |
28 | 28 | POST: '$.env.APIURL/users/login'
|
29 | 29 | headers:
|
30 | 30 | Content-Type: application/json
|
|
37 | 37 | exists: $.resp.body.json.user.bio
|
38 | 38 | exists: $.resp.body.json.user.image
|
39 | 39 | exists: $.resp.body.json.user.token
|
40 |
| -- name: Current User |
| 40 | +- title: Current User |
41 | 41 | GET: '$.env.APIURL/user'
|
42 | 42 | headers:
|
43 | 43 | Content-Type: application/json
|
|
50 | 50 | exists: $.resp.json.user.bio
|
51 | 51 | exists: $.resp.json.user.image
|
52 | 52 | exists: $.resp.json.user.token
|
53 |
| -- name: Update User |
| 53 | +- title: Update User |
54 | 54 | PUT: '$.env.APIURL/user'
|
55 | 55 | headers:
|
56 | 56 | Content-Type: application/json
|
|
64 | 64 | exists: $.resp.json.user.bio
|
65 | 65 | exists: $.resp.json.user.image
|
66 | 66 | exists: $.resp.json.user.token
|
67 |
| -- name: Get All Articles |
| 67 | +- title: Get All Articles |
68 | 68 | GET: '$.env.APIURL/articles'
|
69 | 69 | headers:
|
70 | 70 | Content-Type: application/json
|
|
89 | 89 | exists: $.resp.body.json.articles[0].favorited
|
90 | 90 | exists: $.resp.body.json.articles[0].favoritesCount
|
91 | 91 | number: $.resp.body.json.articles[0].favoritesCount
|
92 |
| -- name: Get Articles by Author |
| 92 | +- title: Get Articles by Author |
93 | 93 | GET: $.env.APIURL/articles?author=johnjacob
|
94 | 94 | headers:
|
95 | 95 | Content-Type: application/json
|
|
116 | 116 | exists: $.resp.body.json.articles[0].favoritesCount
|
117 | 117 | number: $.resp.body.json.articles[0].favoritesCount
|
118 | 118 | ok: $.resp.body.json.articlesCount == $.resp.body.json.articles.length()
|
119 |
| -- name: Get Articles Favorited by Username |
| 119 | +- title: Get Articles Favorited by Username |
120 | 120 | GET: $.envn.APIURL/articles?favorited=$.envn.USERNAME
|
121 | 121 | headers:
|
122 | 122 | Content-Type: application/json
|
|
142 | 142 | exists: $.resp.body.json.articles[0].favoritesCount
|
143 | 143 | number: $.resp.body.json.articles[0].favoritesCount
|
144 | 144 | ok: $.resp.body.json.articlesCount == $.resp.body.json.articles.length()
|
145 |
| -- name: Get Articles by Tag |
| 145 | +- title: Get Articles by Tag |
146 | 146 | GET: $.env.APIURL/articles?tag=dragons
|
147 | 147 | headers:
|
148 | 148 | Content-Type: application/json
|
|
168 | 168 | exists: $.resp.body.json.articles[0].favoritesCount
|
169 | 169 | number: $.resp.body.json.articles[0].favoritesCount
|
170 | 170 | ok: $.resp.body.json.articlesCount == $.resp.body.json.articles.length()
|
171 |
| -- name: Create an Article |
| 171 | +- title: Create an Article |
172 | 172 | POST: $.env.APIURL/articles
|
173 | 173 | headers:
|
174 | 174 | Content-Type: application/json
|
|
187 | 187 | exists: $.resp.body.json.article.author
|
188 | 188 | ok: $.resp.body.json.article.favorited == false
|
189 | 189 | ok: $.resp.body.json.article.favoritesCount == 0
|
190 |
| -- name: Get Feed Articles |
| 190 | +- title: Get Feed Articles |
191 | 191 | GET: $.env.APIURL/articles/feed
|
192 | 192 | headers:
|
193 | 193 | Content-Type: application/json
|
|
215 | 215 | exists: $.resp.body.json.articles[0].favorited
|
216 | 216 | exists: $.resp.body.json.articles[0].favoritesCount
|
217 | 217 | number: $.resp.body.json.articles[0].favoritesCount
|
218 |
| -- name: Get Articles by Author |
| 218 | +- title: Get Articles by Author |
219 | 219 | GET: '$.envn.APIURL/articles?author=$.envn.USERNAME'
|
220 | 220 | headers:
|
221 | 221 | Content-Type: application/json
|
|
244 | 244 | number: $.resp.body.json.articles[0].favoritesCount
|
245 | 245 | exports:
|
246 | 246 | slug: $.resp.body.json.articles[0].slug
|
247 |
| -- name: Get Single Article by Slug |
| 247 | +- title: Get Single Article by Slug |
248 | 248 | GET: $.envn.APIURL/articles/$.stages[-1].slug'
|
249 | 249 | headers:
|
250 | 250 | Content-Type: application/json
|
|
267 | 267 | exists: $.resp.body.json.article.favorited
|
268 | 268 | exists: $.resp.body.json.article.favoritesCount
|
269 | 269 | number: $.resp.body.json.article.favoritesCount
|
270 |
| -- name: Articles by Tag |
| 270 | +- title: Articles by Tag |
271 | 271 | GET: '$.env.APIURL/articles?tag=dragons'
|
272 | 272 | headers:
|
273 | 273 | Content-Type: application/json
|
|
297 | 297 | number: $.resp.body.json.articles[0].favoritesCount
|
298 | 298 | exports:
|
299 | 299 | slug: $.resp.body.json.articles[0].slug
|
300 |
| -- name: Update Article |
| 300 | +- title: Update Article |
301 | 301 | PUT: '$.env.APIURL/articles/$.stages[-1].outputs.slug'
|
302 | 302 | headers:
|
303 | 303 | Content-Type: application/json
|
|
323 | 323 | number: $.resp.body.json.article.favoritesCount
|
324 | 324 | exports:
|
325 | 325 | slug: $.resp.body.json.articles[0].slug
|
326 |
| -- name: Favorite Article |
| 326 | +- title: Favorite Article |
327 | 327 | POST: '$.env.APIURL/articles/$.stages[-1].outputs.slug/favorite'
|
328 | 328 | headers:
|
329 | 329 | Content-Type: application/json
|
|
348 | 348 | exists: $.resp.body.json.article.favoritesCount
|
349 | 349 | number: $.resp.body.json.article.favoritesCount
|
350 | 350 | ok: $.resp.body.json.article.favoritesCount > 0
|
351 |
| -- name: Articles Favorited by Username |
| 351 | +- title: Articles Favorited by Username |
352 | 352 | GET: '$.env.APIURL/articles?favorited=$.env.USERNAME'
|
353 | 353 | headers:
|
354 | 354 | Content-Type: application/json
|
|
378 | 378 | ok: $.resp.body.json.articles[0].favoritesCount == 1
|
379 | 379 | exports:
|
380 | 380 | slug: $.resp.body.json.articles[0].slug
|
381 |
| -- name: Unfavorite Article |
| 381 | +- title: Unfavorite Article |
382 | 382 | DELETE: $.env.APIURL/articles/$.stages[-1].outputs.slug/favorite
|
383 | 383 | headers:
|
384 | 384 | Content-Type: application/json
|
|
404 | 404 | number: $.resp.body.json.article.favoritesCount
|
405 | 405 | exports:
|
406 | 406 | slug: $.resp.body.json.articles[0].slug
|
407 |
| -- name: Create Comment for Article |
| 407 | +- title: Create Comment for Article |
408 | 408 | POST: $.env.APIURL/articles/$.stages[-1].outputs.slug/comments
|
409 | 409 | headers:
|
410 | 410 | Content-Type: application/json
|
|
423 | 423 | exists: $.resp.body.json.comment.author
|
424 | 424 | exports:
|
425 | 425 | slug: $.resp.body.json.articles[0].slug
|
426 |
| -- name: All Comments for Article |
| 426 | +- title: All Comments for Article |
427 | 427 | GET: '$.env.APIURL/articles/$.stages[-1].outputs.slug/comments'
|
428 | 428 | headers:
|
429 | 429 | Content-Type: application/json
|
|
441 | 441 | exists: $.resp.body.json.comments[0].author
|
442 | 442 | exports:
|
443 | 443 | slug: $.resp.body.json.articles[0].slug
|
444 |
| -- name: All Comments for Article without login |
| 444 | +- title: All Comments for Article without login |
445 | 445 | GET: '$.env.APIURL/articles/$.stages[-1].outputs.slug/comments'
|
446 | 446 | headers:
|
447 | 447 | Content-Type: application/json
|
|
458 | 458 | exists: $.resp.body.json.comments[0].author
|
459 | 459 | exports:
|
460 | 460 | slug: $.resp.body.json.articles[0].slug
|
461 |
| -- name: Delete Comment for Article |
| 461 | +- title: Delete Comment for Article |
462 | 462 | DELETE: '$.env.APIURL/articles/$.stages[-1].outputs.slug/comments/{{commentId}}'
|
463 | 463 | headers:
|
464 | 464 | Content-Type: application/json
|
|
476 | 476 | exists: $.resp.body.json.comment.author
|
477 | 477 | exports:
|
478 | 478 | slug: $.resp.body.json.articles[0].slug
|
479 |
| -- name: Delete Article |
| 479 | +- title: Delete Article |
480 | 480 | DELETE: '$.env.APIURL/articles/$.stages[-1].outputs.slug'
|
481 | 481 | headers:
|
482 | 482 | Content-Type: application/json
|
483 | 483 | X-Requested-With: XMLHttpRequest
|
484 | 484 | Authorization: Token $.env.TOKEN
|
485 | 485 | asserts:
|
486 | 486 | ok: $.resp.status == 200
|
487 |
| -- name: Profile |
| 487 | +- title: Profile |
488 | 488 | GET: '$.env.APIURL/profiles/celeb_$.env.USERNAME'
|
489 | 489 | headers:
|
490 | 490 | Content-Type: application/json
|
|
497 | 497 | exists: $.resp.body.json.profile.bio
|
498 | 498 | exists: $.resp.body.json.profile.image
|
499 | 499 | exists: $.resp.body.json.profile.following
|
500 |
| -- name: Follow Profile |
| 500 | +- title: Follow Profile |
501 | 501 | POST: '$.env.APIURL/profiles/celeb_$.env.USERNAME/follow'
|
502 | 502 | headers:
|
503 | 503 | Content-Type: application/json
|
|
512 | 512 | exists: $.resp.body.json.profile.image
|
513 | 513 | exists: $.resp.body.json.profile.following
|
514 | 514 | ok: $.resp.body.json.profile.following == true
|
515 |
| -- name: Unfollow Profile |
| 515 | +- title: Unfollow Profile |
516 | 516 | DELETE: '$.env.APIURL/profiles/celeb_$.env.USERNAME/follow'
|
517 | 517 | headers:
|
518 | 518 | Content-Type: application/json
|
|
525 | 525 | exists: $.resp.body.json.profile.image
|
526 | 526 | exists: $.resp.body.json.profile.following
|
527 | 527 | ok: $.resp.body.json.profile.following == false
|
528 |
| -- name: All Tags |
| 528 | +- title: All Tags |
529 | 529 | GET: '$.env.APIURL/tags'
|
530 | 530 | headers:
|
531 | 531 | Content-Type: application/json
|
|
0 commit comments