-
Notifications
You must be signed in to change notification settings - Fork 254
feat: Merged basket creation and checkout in one View #4160
Conversation
@@ -10,6 +11,7 @@ | |||
) | |||
|
|||
urlpatterns = [ | |||
url(r'^basket-checkout/$', BasketCheckoutView.as_view(), name='mobile-basket-checkout'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like many of the other mobile view are prefixed with Mobile
, should this on be as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.
basket = prepare_basket(request, available_products) | ||
except AlreadyPlacedOrderException: | ||
logger.exception(LOGGER_BASKET_ALREADY_PURCHASED, request.user.username, skus) | ||
return JsonResponse({'error': _(ERROR_ALREADY_PURCHASED)}, status=status.HTTP_406_NOT_ACCEPTABLE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a test to cover this path?
I think we might need another one for line 206/211 as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These lines are already covered since new test case class is inheriting MobileBasketAddItemsViewTests class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting. i didn't expect the inheritance to behave that way. that's neat
⛔️ MAIN BRANCH WARNING! 2U EMPLOYEES must make branches against the 2u/main BRANCH
⛔️ DEPRECATION WARNING
This repository is deprecated and in maintainence-only operation while we work on a replacement, please see this announcement for more information.
Although we have stopped integrating new contributions, we always appreciate security disclosures and patches sent to [email protected]
Anyone internally merging to this repository is expected to release and monitor their changes; if you are not able to do this DO NOT MERGE, please coordinate with someone who can to ensure that the changes are released.
Required Testing
(^ We can remove that manual check once REV-2624 is done and the corresponding e2e test runs again)
Description
Merged basket creation and checkout in one View. This view will now accept product sku and payment processor name and will return a checkout out basket id. After this call we can now move on with payment execution.
Supporting information
https://2u-internal.atlassian.net/browse/LEARNER-9913
Testing instructions
Please provide detailed step-by-step instructions for testing this change; how did YOU test this change?
Other information
Include anything else that will help reviewers and consumers understand the change.