chatty-clownfish / bangazon-sprint-2

1 stars 0 forks source link

Customer can add a product to sell #1

Open kimberly-bird opened 5 years ago

kimberly-bird commented 5 years ago

Given the user is not authenticated When any view renders Then the Sell a Product affordance will not be visible

Given the user is authenticated When the user clicks on the Sell a product button in the menu bar Then the user will be presented with a product form

Given the user has filled in all fields of the product form with valid information When the user clicks the Sell button Then the user will be redirected to the product detail view for that product

Given the user has filled in all fields of the product form with any invalid information When the user clicks the Sell button Then the user will be immediately notified with error information for each invalid value

CosignMyCodesign commented 5 years ago
  1. This section is null because the user will always be greeted with the login page. Therefore, they must be authenticated to access the app .

  2. After Logging in, the user will be presented with a Sell a product button in the menu/navbar. When clicked, they will be linked to the sell_a_product_form.html template (remember we are doing forms by class).

  3. After filling out the form to sell the product (valid information in the form fields). When the user clicks the Sell button they will be routed to the product_detail.html template (this is associated with the product_detail.view).

  4. If the form is filled out with invalid information, the user will be notified with an error for each of the invalid values. (curious how this is done, I'll try to research a bit and come back to this)

Models/Tables involved:

  1. User
  2. Customer
  3. Product
  4. ProductType (most likely)
robbyhecht commented 5 years ago

--from sell button in navbar--

'Add Product' View 'Add Product' Template Fields must all be valid for submission

--adds the product to detail page--