Giter Club home page Giter Club logo

black_shop_of_horrors's Introduction

README

Black Shop of Horrors is a online shop where you can purchase black market items that would otherwise be illegal.

We developed it via TDD, per stories from our "client", over the course of a week and a half.

This was a group project by Seth Mo, Christopher Dale, and Josh Thompson.

Project Spec

Black Shop of Horrors is deployed on Heroku, where you can access the application inf a few different ways:

As a guest

As a guest, you can view any items in the shop and add them to your cart. When you log out, you'll be prompted to create a new account.

Items index:

items available for purchase

As a User

As a user, when you visit /login, you'll be prompted for your email address and password.

Upon login, you can view your past order history, or of course make a new order.

black_shop_of_horrors's People

Contributors

cdale3 avatar josh-works avatar seth-at-at avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

akirabrand

black_shop_of_horrors's Issues

create Navbar

Need to make a navbar for our site. - Do this after ISSUE 7 & 8 - Authenticated User

Navbar in the header
Links in the footer

create rspec test: visitor can view site (2)

issueTwo:
title: Visitor can view items
body: >
Background: I have several items and each of them has a title, description, price, and image

  As a visitor
  When I visit "/items"
  I can see all existing items

Story 13

title: Authenticated users security
body: >
Background: An authenticated user

  As an Authenticated User
  I cannot view another user's private data (current or past orders, etc)
  I cannot view the administrator screens or use admin functionality
  I cannot make myself an admin

refactor tests

remove all instances of expect(page).to... change to "inside of CSS item"

increment/decrement buttons

items in cart should show quantity, with buttons to increase/decrease quantity of item in cart.

should be possible for user to enter custom quantity

negative values should not be valid.

Leave "remove #{item} from count"

Viewing a past order (10)

Background: An existing user that has one previous order

As an authenticated user
When I visit “/orders”
Then I should see my past order
And I should see a link to view that order
And when I click that link
Then I should see each item that was order with the quantity and line-item subtotals
And I should see links to each item’s show page
And I should see the current status of the order **(ordered, paid, cancelled, completed)**
And I should see the total price for the order
And I should see the date/time that the order was submitted
If the order was completed or cancelled
Then I should see a timestamp when the action took place

Cart model needs 3 methods cleaned up

  1. def items
    => Item.find(contents.keys)
    (instead of enumerable)

  2. def delete
    clean this up to work w/the cart edit things

  3. def total_cost
    contents.reduce(0) do |sum, hash|

Admin user dashboard (15)

As an Admin
When I visit "/admin/dashboard"
I will see a heading on the page that says "Admin Dashboard"
As a registered user
When I visit "/admin/dashboard"
I get a 404
As an unregistered user
When I visit "/admin/dashboard"
I get a 404

Retired Items (11)

Retired Items

As a user if I visit an item page and that item has been retired
Then I should still be able to access the item page
And I should not be able to add the item to their cart
And I should see in place of the “Add to Cart” button or link - “Item Retired”

Viewing Past Orders (9)

Viewing past orders

Background: An existing user that has multiple orders

As an Authenticated User
When I visit “/orders”
Then I should see all orders belonging to me and no other orders

RSpec feature test: Removing an item from my cart (5)

issueFive:
title: Removing an item from my cart
body: >
Background: My cart has an item in it

  As a visitor
  When I visit "/cart"
  And I click link "Remove"
  Then my current page should be "/cart"
  And I should see a message styled in green
  And the message should say "Successfully removed SOME_ITEM from your cart."
  And the title "SOME_ITEM" should be a link to that item in case the user wants to add it back
  And I should not see the item listed in cart

Admin edits an item (22)

issueTwentyTwo:
title: Admin edits an item
body: >
Background: an existing item

 As an admin
 When I visit “admin/items”
 And I click “Edit”
 Then my current path should be “/admin/items/:ITEM_ID/edit”
 And I should be able to upate title, description, image, and status

Guest User (8)

Guest User

   As a visitor when I have items in my cart
   And when I visit “/cart”
   I should not see an option to “Checkout”
   I should see an option to “Login or Create Account to Checkout”
   After I create an account
   And I visit “/cart
   Then I should see all of the data that was there when I was not logged in

   When I click “Logout”
   Then I should see see “Login”
   And I should not see “Logout”

Checking Out (12)

Checking Out

Background: An existing user and a cart with items

As a visitor
When I add items to my cart
And I visit “/cart”
And I click “Login or Register to Checkout”
Then I should be required to login
When I am logged in
And I visit my cart
And when I click “Checkout”
Then the order should be placed
And my current page should be “/orders”
And I should see a message “Order was successfully placed”
And I should see the order I just placed in a table

root page should show _only_ categories

update:

  • spec/features/categories/index_can_be_viewed...
  • probably another rspec test

Change views/categories/index.html.erb to show only categories, no individual items.

Authenticated User (7)

issueSeven:
title: Authenticated User

   As a visitor
   When I visit “/”
   Then I should see a link for “Login”
   And when I click “Login”
   And I should be on the “/login” page
   I should see a place to insert my credentials to login
   And I should see a link to “Create Account”
  
   As a visitor 
   When I visit “/login
   And when I click link “Create Account”
   And I fill in my desired credentials
   And I submit my information
   Then my current page should be “/dashboard”
   And I should see a message in the navbar that says “Logged in as SOME_USER”
   And I should see my profile information
   And I should not see a link for “Login”
   And I should see a link for “Logout”

Admin Orders (Dashboard) (18)

As an Admin
When I visit the dashboard
Then I can see a listing of all orders
And I can see the total number of orders for each status ("Ordered", "Paid", "Cancelled", "Completed")
And I can see a link for each individual order
And I can filter orders to display by each status type ("Ordered", "Paid", "Cancelled", "Completed")
And I have links to transition between statuses
- I can click on "cancel" on individual orders which are "paid" or "ordered"
- I can click on "mark as paid" on orders that are "ordered"
- I can click on "mark as completed" on orders that are "paid"

partial issue 12

When I am logged in
And I visit my cart
And when I click “Checkout”
Then the order should be placed
And my current page should be “/orders”
And I should see a message “Order was successfully placed”
And I should see the order I just placed in a table

RSpec test: Browsing Items by category (3) WIP

issueThree:
title: Browsing Items by category
body: >
Background: I have two categories with titles and each has two different items assigned

  As a visitor
  When I visit "/:CATEGORY_NAME"
  I see all items assigned to that category

update order show page (story 10)

Then I should see each item that was order with the quantity and line-item subtotals
And I should see links to each item’s show page
And I should see the current status of the order (ordered, paid, cancelled, completed)

on order show page: date/time displays

And I should see the date/time that the order was submitted

 If the order was completed or cancelled
 Then I should see a timestamp when the action took place

RSpec feature test: Adjusting the quantity of an item in the cart (6)

issueSix:
title: Adjusting the quantity of an item in the cart
body: >
Background: My cart has an item in it

  As a visitor
  When I visit "/cart"
  Then I should see my item with a quantity of 1
  And when I increase the quantity
  Then my current page should be '/cart'
  And that item's quantity should reflect the increase
  And the subtotal for that item should increase
  And the total for the cart should match that increase

  And when I decrease the quantity
  Then my current page should be '/cart'
  And that item's quantity should reflect the decrease
  And the subtotal for that item should decrease
  And the total for the cart should match that decrease

Unauthenticated users security (14)

Background: An unauthenticated user and their abilities

  As an Unuthenticated User
  I cannot view another user's private data, such as current order, etc.
  I should be redirected to login/create account when I try to check out.
  I cannot view the administrator screens or use administrator functionality.
  I cannot make myself an administrator.

RSpec feature test: Adding items to the cart (4)

issueFour:
title: Adding items to the cart
body: >
Background: Items, and a user that is not logged in

  As a visitor
  When I visit any page with an item on it
  I should see a link or button for "Add to Cart"
  When I click "Add to cart" for that item
  And I click a link or button to view cart
  And my current path should be "/cart"
  And I should see a small image, title, description and price for the item I just added
  And there should be a "total" price for the cart that should be the sum of all items in the cart

wireframe top three views (1)

label: Backlog, Pertinent
body: >
Think about what you think the workflow should be on the site. Which of those views is most important?
In addition to the home page wireframe, create wireframes the page immediately following your Log In and the next most important page for your application.

  Examples might be: A users' profile page, a product page, an admin dashboard etc...

slugify item_paths

Just like Chris added slugs for categories path, we should have the same for item paths.

Wireframe site

issueOne:
title: Create Wireframes for Most Important Views
label: Backlog, Pertinent
body: >
Think about what you think the workflow should be on the site. Which of those views is most important?
In addition to the home page wireframe, create wireframes the page immediately following your Log In and the next most important page for your application.
Examples might be: A users' profile page, a product page, an admin dashboard etc...

convert images in app to use image_tag

utilize asset pipeline by putting all images in our app/assets, and linking to them by using the image_tag helper method.

In the commit message, list all the touched files.

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.