2022-Spring-NYU-DevOps-Shopcarts / shopcarts

Shopcarts squad.
Apache License 2.0
2 stars 2 forks source link

adding hold related code in service and test #123

Closed Adora2401 closed 2 years ago

Adora2401 commented 2 years ago

Added code about route for 'hold for later', waiting for the previous conflict resolved.

codecov-commenter commented 2 years ago

Codecov Report

Merging #123 (fd83db6) into main (eeb0b40) will increase coverage by 1.74%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #123      +/-   ##
==========================================
+ Coverage   97.33%   99.08%   +1.74%     
==========================================
  Files           7        7              
  Lines         413      436      +23     
==========================================
+ Hits          402      432      +30     
+ Misses         11        4       -7     
Impacted Files Coverage Δ
service/utils/error_handlers.py 100.00% <ø> (+21.21%) :arrow_up:
service/models.py 100.00% <100.00%> (ø)
service/routes.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update eeb0b40...fd83db6. Read the comment docs.

TimothyXu commented 2 years ago
  1. Need to refactor into Flask-X/swagger (including creating a new swagger data model now that we have this extra hold column, and add swagger docs to the route)
  2. Per Professor's comments need to change the route to shopcarts//items//resume
  3. Missing behave BDD tests (criteria already in ZenHub)
Adora2401 commented 2 years ago
  1. Need to refactor into Flask-X/swagger (including creating a new swagger data model now that we have this extra hold column, and add swagger docs to the route)
  2. Per Professor's comments need to change the route to shopcarts/int:user_id/items/int:item_id/resume
  3. Missing behave BDD tests (criteria already in ZenHub) Thanks Timothy, 1&2 have been done. I still have no idea about 3.
Adora2401 commented 2 years ago

Hi, I have a question about the BDD test for our new feature "Hold for later". As it's a feature for user instead of Shopcart Store Owner in our original shopcarts.feature, until now I just updated shopcarts.feature, shopcarts_steps.py, rest_api.js, index.html to add "hold" in column and table so that the Shopcart Store Owner could view the True/False in the demo page. Additionally, I didn't add any scenrio in shopcarts.feature as I am not sure whether we need it or not. Also, these changes lead BDD test failed. Could anyone take this part or give me some advice? I have no idea why resp doesn't get the data. Thank you all so much for your time and help.

kdokm commented 2 years ago

Hi, I have a question about the BDD test for our new feature "Hold for later". As it's a feature for user instead of Shopcart Store Owner in our original shopcarts.feature, until now I just updated shopcarts.feature, shopcarts_steps.py, rest_api.js, index.html to add "hold" in column and table so that the Shopcart Store Owner could view the True/False in the demo page. Additionally, I didn't add any scenrio in shopcarts.feature as I am not sure whether we need it or not. Also, these changes lead BDD test failed. Could anyone take this part or give me some advice? I have no idea why resp doesn't get the data. Thank you all so much for your time and help.

I think maybe it is because the “hold” data passed in shopcart_steps.py is not boolean, which causes the initial create fails. However, I haven’t check it so I’m not sure. I guess you can observe logs in ‘honcho start’ terminal when running behave to see what happens. When I have time, if this problem is still not solved, I can take care of it.

Adora2401 commented 2 years ago

Hi, I have a question about the BDD test for our new feature "Hold for later". As it's a feature for user instead of Shopcart Store Owner in our original shopcarts.feature, until now I just updated shopcarts.feature, shopcarts_steps.py, rest_api.js, index.html to add "hold" in column and table so that the Shopcart Store Owner could view the True/False in the demo page. Additionally, I didn't add any scenrio in shopcarts.feature as I am not sure whether we need it or not. Also, these changes lead BDD test failed. Could anyone take this part or give me some advice? I have no idea why resp doesn't get the data. Thank you all so much for your time and help.

I think maybe it is because the “hold” data passed in shopcart_steps.py is not boolean, which causes the initial create fails. However, I haven’t check it so I’m not sure. I guess you can observe logs in ‘honcho start’ terminal when running behave to see what happens. When I have time, if this problem is still not solved, I can take care of it.

Thanks Yuwen, solved.

kdokm commented 2 years ago
  1. Need to refactor into Flask-X/swagger (including creating a new swagger data model now that we have this extra hold column, and add swagger docs to the route)
  2. Per Professor's comments need to change the route to shopcarts/int:user_id/items/int:item_id/resume
  3. Missing behave BDD tests (criteria already in ZenHub)

I think BDD tests are for the UI, so this version is enough for the connected story now.

TimothyXu commented 2 years ago
  1. Need to refactor into Flask-X/swagger (including creating a new swagger data model now that we have this extra hold column, and add swagger docs to the route)

  2. Per Professor's comments need to change the route to shopcarts/int:user_id/items/int:item_id/resume

  3. Missing behave BDD tests (criteria already in ZenHub)

I think BDD tests are for the UI, so this version is enough for the connected story now.

Oh you're absolutely right! Sorry I confused the TDD test in acceptance criteria with BDD. My bad