Skip to content

Latest commit

 

History

History
122 lines (59 loc) · 2.18 KB

unit_testing.md

File metadata and controls

122 lines (59 loc) · 2.18 KB

GreenSeed Unit Testing

Home App {#home-app}

  • Home view

  • Our Plants view

  • About view

  • Contact view

  • Fontact Form functionality

  • Login functionality

  • Logout functionality


Screenshot of GreenSeed website

Profiles App {#profiles-app}

  • Create a user

  • Login as user

  • Send GET request

  • Check if response is OK (200)

  • Check that the view returns the correct user

Screenshot of GreenSeed website

Shop App {#shop-app}

Shop view

  • Send a GET request to the view

  • Check that the response is 200 (OK)

  • Check that the view returns the correct template

Product Detail view

  • Create a product

  • Send a GET request to the view

  • Check that the response is 200 (OK)

  • Check that the view returns the correct product

  • Check that the view returns the correct template

Screenshot of GreenSeed website

Reviews app {#reviews-app}

  • Create a user

  • Test review form submission

  • Login as the user

  • Create a new product

  • Send a POST request to the view with the ID of the new product

  • Check that the response is 302 (redirect)

  • Check that a review was added to the database

  • Test review form submission with no title

  • Check that the correct error message was returned

Screenshot of GreenSeed website

Management app {#management-app}

  • Test management view

  • Log in as regular user

  • Send a GET request to the view

  • Check that the response is 302 (Forbidden)

  • Test admin login

  • Send a GET request to the view

  • Check that the response is 200 (OK)

  • Test add product view

  • Send a GET request to the view

  • Check that the response is 200 (OK)

  • Check that a new product was created

Screenshot of GreenSeed website

Checkout app {#checkout-app}

  • send a GET request to the cart view

  • Check that the response is 200 (OK)

  • Check that the view returns the correct template

Screenshot of GreenSeed website