Coder Social home page Coder Social logo

coupon_codes's Introduction

Coupon Codes

There is currently no live deployment of this application.

To set up this code locally, run the following commands in your terminal:

$ bundle install
$ rails db:{drop,create,migrate,seed}

This command will create a new database, import data from many different CSVs (merchants, items, transactions etc), as well as create a few default coupons and apply them to a few invoices for Merchant #1 (to see functionality right away).

Evaluation

Link to Evaluation Rubric

  • Complete All User Stories
  • Students use the principles of MVC to effectively organize code with only 1 - 2 infractions. Routes and Actions mostly follow RESTful conventions
  • ActiveRecord helpers are utilized most of the time. More complex ActiveRecord (joining, grouping, aggregating) is used to process data at least once. Queries are functional and accurate.
  • 100% coverage for models.
  • 98% coverage for features.
  • Tests are well written and meaningful. All tests passing. TDD Process is clear throughout commits. Some effective sad path and edge case testing. Tests utilize within blocks to target specific areas of a page.

Consolidated User Story Progress

Link to User Stories

  • User Story 0 - Deploy to Heroku
  • User Story 1 - Merchant Coupons Index
  • User Story 2 - Merchant Coupon Create
  • User Story 3 - Merchant Coupon Show Page
  • User Story 4 - Merchant Coupon Deactivate
  • User Story 5 - Merchant Coupon Activate
  • User Story 6 - Merchant Coupon Index Sorted
  • User Story 7 - Merchant Invoice Show Page: Subtotal and Grand Total Revenues
  • User Story 8 - Admin Invoice Show Page: Subtotal and Grand Total Revenues

Utilized Sad Paths

When creating a coupon:

  • An error is thrown on Create Coupon when no field is filled in
  • An error is thrown on Create Coupon when all but one field is filled in (name, code, amount, amount type)
  • An error is thrown on Create Coupon when the amount is not a number
  • An error is thrown on Create Coupon when the code is not unique

When enabling a coupon:

  • An error is thrown on Activate Coupon when the merchant has 5 coupons already enabled

Tests

  • 154 Tests Total (100% coverage on 1592 LOC)
  • 77 Model Tests (100% coverage on 525 LOC)
  • 77 Feature Tests (100% coverage on 1205 LOC)

Notes

Bug 1: FIXED

Solution: Added a within block to section off a part of the invoice so there would be no interference

Problem: Admin Invoices Index Page:53 will sometimes throw an error because the number can randomly appear in the randomly generated Invoice #
Had to change the schema to allow nil values for coupon_id on Invoices, and thus had to change some of the validation testing to "allow blank and nil"
Went back and added a migration for coupon_id to appear in invoices

coupon_codes's People

Contributors

grantdavis303 avatar mikedao avatar cjsim89 avatar juliet-e avatar abdulredd avatar

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.