indiesquidge / dinner_dash Goto Github PK
View Code? Open in Web Editor NEWCommerce platform for a restaurant to facilitate online ordering.
Home Page: https://thedirtycookie.herokuapp.com
Commerce platform for a restaurant to facilitate online ordering.
Home Page: https://thedirtycookie.herokuapp.com
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?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.As an Authenticated User,
When I click on the account page,
Then I see links to each item description page.
As an Authenticated User,
When I click on my account (/account),
Then I see items with quantity ordered and line-item subtotals.
As an Unauthenticated User
When I visit /menu/:category
Then I can see all items associated with that :category
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"
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"
As an Unauthenticated User
When I visit /account
Then I should be redirected to the login page (/login)
And I should see a flash message “You need to login or signup to view your account"
As an Authenticated User,
When I click on the account page,
Then I see the order total price.
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
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
As an Authenticated User,
When I click on a retired item's display page,
Then I cannot add the retired item to a new cart.
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."
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.
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
As an Unauthenticated User
When I visit /admin/dashboard
Then I should redirected to /
And I should see a flash message “Unauthorized"
As an Unauthenticated User
When I visit /cart
Then I should see all items in my Cart
As an Administrator
When I have no orders on my page
And I visit /admin/dashboard/
Then I see "Cheer up, business will come!"
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
As an Authenticated User,
When I click on the account page,
Then I see the current status of an order.
As an Authenticated User,
When I click on the account page,
Then I access item pages for retired items.
As an Unauthenticated User
When I visit /menu
Then I can see all Items
default value has a value of 1
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
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
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'
As an Authenticated User,
When I type in the path of /admin/:dashboard,
Then I see “Unauthorized” and am routed back to homepage.
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.
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'
As an Authenticated User,
When I click on my account (/account),
Then I see all past orders.
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
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.
Items
Categories
Orders
Users
As an administrator
When I visit /admin/dashboard
And I see a list of all orders
And I can click the links for each individual order
Then I see the total number of orders
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
As an Authenticated User,
When I click on the account page,
Then I see the date/time order was submitted.
As an Authenticated User,
When I click on the account page,
Then I see the timestamps for when completed/canceled actions took place.
As an Unauthenticated User
When I visit /cart
And I increase the quantity of an item in my cart
Then the size of my cart should increase by one
As an Unauthenticated User
When I visit '/menu'
And I see a category tag associated with an item
And I click on that tag
Then I am redirected to that category page
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.