Coder Social home page Coder Social logo

lethal-lemurs / bangazon-cli Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 87 KB

The Lethal Lemurs quest to create the ultimate CLI based shopping experience with testing, hair pulling, plagues, eminent alien invasions and flat tires.

JavaScript 100.00%
bangazon cli nss prompt tdd

bangazon-cli's People

Contributors

adobe-android avatar dlwalker1234 avatar glenvollmer avatar julessepulveda avatar julessplvd avatar staffmaster00 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

bangazon-cli's Issues

User should be able to view the active customer's revenue report

  • Given a customer requests their overall revenue
  • When the user selects the corresponding option from the main menu
  • Then the user should be presented with the following report
Revenue report for Svetlana:

Order #34
----------------------------------------------------
Marble                          15         $21.43

Order #109
----------------------------------------------------
Kite                            1          $5.12
Marble                          5          $5.52

Total Revenue: $32.07

User should be able to add a payment option for a customer

  • #Given a customer has been made active in the program
  • When the user selects the option to add a payment type
  • Then the user should be prompted to enter in all appropriate information for a payment type
  • And when complete, the payment type should be added for the active customer
Enter payment type (e.g. AmEx, Visa, Checking)
>

Enter account number
>

User should be able to create a Customer account

  • Given a new customer calls with a request for a representative to handle
  • When the user select the option to create a customer account
  • Then the user should be presented with prompts to enter in customer information
Enter customer name
>

Enter street address
>

Enter city
>

Enter state
>

Enter postal code
>

Enter phone number
>

User should be able to view stale products

  • Given a user wants to see products that aren't selling
  • When the user selects the option to view stale products
  • Then the user should be presented with a list of all products that meet any of the following criteria
  1. Has never been added to an order, and has been in the system for more than 180 days
  2. Has been added to an order, but the order hasn't been completed, and the order was created more than 90 days ago
  3. Has been added to one, or more orders, and the order were completed, but there is remaining quantity for the product, and the product has been in the system for more than 180 days

Pro tip: Investigate the SQL Union operation to fulfill these requirements

User should see overall product popularity

  • Given a user wants to see the most popular products in the system
  • When the user selects the corresponding option from the main menu
  • Then the user should see the following report
Product             Orders      Purchasers    Revenue
*******************************************************
AA Batteries        100         20            $990.90 
Diapers             50          10            $640.95
Case of Cracking... 40          30            $270.96
*******************************************************
Totals:             190         60            $1,902.81

-> Press any key to return to main menu
  1. User will see the top 3 revenue generating products
  2. The product column must be 20 characters wide, and will display a maximum of 18 characters for the product name.
  3. The orders column must be 11 characters wide.
  4. The purchasers column must be 15 characters wide.
  5. The revenue column must be 15 characters wide.

User should be able to remove a product

  • Given a customer wants to remove a product from the system
  • When the user selects the option to remove a product
  • Then the user should be presented with a numbered list of all of the active customer's product
  • And when one is selected, it should be deleted from the system if it has not been added to an order yet
Choose product to delete:
1. Kite
2. Marbles
3. Refrigerator
>

User should be able to update a product

  • Given a customer wants to update product information in the system
  • When the user selects the option to update a product
  • Then the user should be presented with a numbered list of all of the active customer's product
  • And when one is selected, the title, description, price, and quantity should be displayed
  • And the user can select which one to update
Select a product to update:
1. Kite
2. Marbles
3. Refrigerator
>
1. Change title "Refrigerator"
2. Change description "It keeps things cold"
3. Change price "149.99"
4. Change quantity "1"
>
Enter new price:
>

User should be able to add product to customer order

  • Given a customer has been made active in the program
  • When the user selects the option to add a product to the active customer's order
  • Then the user should be prompted with a numbered list of all products
  • And when one is chosen, the product should be added to an order for the active customer

Pro tip: To make it easier to add multiple products, when the user selects a product to add to the customer's order, display the menu of products again. Make sure the last option provides the option to go back to main menu.

1. Diapers
2. Case of Cracking Cola
3. Bicycle
4. AA Batteries
...
9. Done adding products

User should be able to select who the active Customer is

  • Given the user needs to perform an action on behalf of a customer
  • When the user selects the option to choose which customer is active
  • Then the user should be presented with a numbered list of all customers
  • And be able to select one of the customers
Which customer will be active?
1. John Q. Public
2. Svetlana Z. Herevazena
>

User should be able to able to complete a customer order

Sam has some code for this already.

  • Given a customer has been made active in the program
  • When the user selects the option to complete an order
  • Then the user should be prompted to choose one of the active customer's payment options
  • And when one is chosen, the payment option should be added to the open order

If no products have been selected yet

Please add some products to your order first. Press any key to return to main menu.

If there are current products in an order

Your order total is $149.54. Ready to purchase
(Y/N) >

# If user entered Y
Choose a payment option
1. Amex
2. Visa
>

User should be able to add a product for a customer

  • Given a customer has been made active in the program
  • When the user selects the option to add a product
  • Then the user should be prompted to enter in all appropriate information for a product
  • And when complete, the product should be added for the active customer

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.