Giter Site home page Giter Site logo

dinner_dash's People

Contributors

joshcheek avatar mirjoy avatar teresafinn avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

joshcheek mirjoy

dinner_dash's Issues

Questions we have for mentors, teachers, whomever

  • Should we be validating the presence of things like user_id on a join table? Since those values aren’t being created by a user (but rather by the database) is it safe to leave it blank?
  • Possibly test traits on status
  • How do we next categories and items underneath menu so that we can still
  • Won’t work replacing data[item.id.to_s]. Need to ask about this issue.
  • spec/features/unauth_users/user_login_spec.rb needs heavy refactoring. Unknown stubbing required.
  • how do we keep login/logout button logic out of the view?
  • what does RESTful mean?

Administratror can modify item listings

As an Administrator
When I visit /admin/menu
And I click on 'Edit Item'
And I am directed to the item's page /admin/menu/:name/edit
And I modify the item's name, description, price and photo
And I click 'Save'
Then I see the updated item's page and a message "Item updated"

As an Administrator
When I visit /admin/menu
And I click on 'Edit Item'
And I am directed to the item's page /admin/menu/:name/edit
And I modify the item's name, description, price and leave one of those fields empty
And I click 'Save'
Then I see the item's edit page and a message "Attributes missing"

Authenticated users can log in and out

As an Authenticated User, 
When I click login,
Then I see a flash message “Successfully logged in”,
Then I am routed to /home
And the "login" button should now read "logout"

As an Authenticated User, 
When I click logout,
Then I see a flash message “Successfully logged out”,
Then I am routed to /home.
And the "logout" button should now read "login"

Test ticket from Code Climate

Using Code Climate to automatically test our coverage report. I don't really know what I'm doing, or if this is even useful, but it seemed like something fun to set up. Any issues with the code_climate tag are generated by Code Climate for us. This is just a test; I don't know what a real issue card will look like.

CODECLIMATE_REPO_TOKEN=0c7bf9f4e1b8f1f96521854730bfa8bda19a429f7a597678f0ba8c281fe72f78

Unauthenticated User can remove items from their cart

As an Unauthenticated User
When I visit /cart
And I click “Remove from Cart” on an Item
And I see a flash alert that “The item has been removed from your cart”
And I see the item disappear from my Cart
Then I should see the cart size decrease by one item

Administrator can add categories to new items

As an Administrator
When I visit /admin/menu
And I click 'Edit Item'
And I am directed to /admin/menu/item/:name/edit
And I choose categories for that item.
And I see a message 'Your item has been updated."
Then that item is associated with those categories

As an Administrator
When I visit /admin/menu
And I click 'Edit Item'
And I am directed to /admin/menu/item/:name/edit
And I choose no categories for that item
Then I see a message 'Please choose at least one category."

Authenticated users can log in

As an Authenticated User, 
When I visit /login,
And I enter my name and password,
And I click log in,
Then I am a redirected to the /menu,
And see a “Welcome, !” message. 

As an Authenticated User, 
When I visit /login,
And I enter the wrong name or password,
And I click log in,
Then I see a flash message “Invalid credentials” on /login.

Administrator can filter all orders

As an administrator
When I visit /dashboard
And I click 'Filter by Status Type'
Then I see orders filtered by ordered, paid, cancelled, and completed

Unauthenicated User can log in, which does not clear the cart

As an Unauthenticated User
When I visit /login
And I enter my credentials to log in
Then I am redirected to the /cart page
And my cart should be unchanged by the login

As an Unauthenticated User
When I visit /login
And I enter my credentials incorrectly
Then I should see a flash message “Incorrect username or password, try again”
And my cart should be unchanged by the login failure
And I should still be on the /login page

if we have the time

  • after login, redirect user to page they were on before login
  • refactor update categories
  • need model test for items to assert that it must be created with at least one associated category

Administrator can access details of an individual order,

As an Administrator
When I click on an individual order link
And I am directed to admin/dashboard/order/:id
And I see order date and time
And I see purchaser full name and email address
And I for each item on the order I see:
Name linked to the item page
Quantity
Price
Line item subtotal
Total for the order
Status of the order

Unauthenticated User can add items to their cart

As an Unauthenticated User
When I visit /menu
And I click “Add to Cart” on a particular listed item
And I see a flash alert that “The item has been added to your cart”
Then I should see the cart size increase by one item

Administrator can create new category

As an Administrator
When I visit /admin/menu
And I click 'Create New Category'
And I go to /admin/menu/category/new
And I enter a new category
And I click 'submit'
And I see a flash message 'Your category has been created'
Then see my new category listed with the others

As an Administrator
When I visit /admin/menu
And I click 'Create New Category'
And I go to /admin/menu/category/new
And I enter a duplicate category
And I click 'submit'
Then I see a flash message 'This category has already been created'

As an Administrator
When I visit /admin/menu
And I click 'Create New Category'
And I go to /admin/menu/category/new
And I enter nothing
And I click 'submit'
Then I see a flash message 'Missing attribute'

Authenticated User can checkout

As an Authenticated User
When I visit '/cart'
And I click 'Checkout'
And I can see this order added on my account page
Then my cart is cleared.

Administrator can create item listings

As an Administrator
When I visit /admin/menu
And I click 'Create New Item'
And I am directed to /admin/menu/new
And I add a name, description, and price
And I upload a photo
Then I am redirected to the new item's page

As an Administrator
When I visit /admin/menu
And I click 'Create New Item'
And I am directed to /admin/menu/new
And I do not fill out a name or description or price
Then I receive an error message 'Attributes missing'

Administrator can retire an item

As an Administrator
When I visit /admin/menu
And I click 'Edit Item'
And I am directed to /admin/menu/item/:name/edit
And I choose 'Retire Item'
And I am redirected to /admin/menu
Then I see a message 'This item has been retired"
And it no longer appears on the menu to non-admin users

Unauthenticated User can create new account

As an Unauthenticated User
When I visit /login
And I do not already have a registered account to sign in with
Then I should be able to fill in the Sign up form with my personal details and click "Sign up"
And I should be redirected to my newly created account page.

Add required seed data

Items

  • At least 20 items of varying prices
  • Some of the items should be attached to multiple categories

Categories

  • At least 5 categories with a varying number of member items

Orders

  • At least 10 sample orders, with at least two at each stage of fulfillment (ordered, completed, cancelled)

Users

  • Normal user with full name "Rachel Warbelow", email address "[email protected]", password of "password" and no display name
  • Normal user with full name "Jeff Casimir", email address "[email protected]", password of "password" and display name "j3"
  • Normal user with full name "Jorge Tellez", email address "[email protected]", password of "password" and display name "novohispano"
  • User with admin priviliges with full name "Josh Cheek", email address "[email protected]", password of "password", and display name "josh"

Administrator can change the status of an order

As an administrator
When I visit /admin/dashboard
And I click 'Edit Status' on an order
And I can cancel orders that are marked as ordered or paid
And I can mark as paid orders which are ordered
Then I can mark as completed orders that are paid

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.