Skip to content

Latest commit

 

History

History
398 lines (306 loc) · 26 KB

TESTING.md

File metadata and controls

398 lines (306 loc) · 26 KB

Go back to README.md

Testing

Table of contents

Code Validation

Google lighthouse Validation

All pages were tested with Google Chrome Lighthouse. Testing was performed in private browsing mode and on the live website on Heroku.

Page Image
Home Home
All Products All Products
Product Details Product Details
About About
Add Product Add Product
Edit Product Edit Product
Cart Empty Cart Empty
Cart with Products Cart with Products
Checkout Checkout
Checkout Success Checkout Success
Profile Profile
Login Login
logout Logout
Sign Up Sign Up
Password Reset Password Reset

CSS Validation

  • No errors were found when passing through the official W3C validator. CSS Validator

HTML Validation

  • All pages were passed through the official W3C validator.
  • Validating was done by a live website on Heroku. Some errors were found but they were fixed immediately.
Page Image
Home Home
All Products All Products
Product Details Product Details
Product Details returned 60 CSS parse errors. All coming from Django_Summernote. Product detail page has description and specification fields that are using Django_Summernote.
Add Product and edit product
  • Add Product returned 16 different errors. All coming from Django_Summernote. Add Product page has description and specification fields that are using Django_Summernote.
  • Given more time I would like to try to fix these errors.
  • Because these pages are using same form they have same errors.

Add Product Add Product Add Product Product Management

  • About page returned 4 errors. All coming from Django_Summernote.

About

Edit About
  • Edit About page returned 36 errors. All coming from Django_Summernote.

    Edit Product Edit Product Edit Product Edit Product Edit Product Edit Product

Page Image
Cart Empty Cart Empty
Cart with Products Cart with Products
Profile ![Profile](/static/images/readme_images/validators/profile.png
Profile returned 1 error. Missing alt tag on image. That image is a flag in django-countries.
Checkout Checkout
Checkout Success Checkout Success
Login Login
logout Logout
Sign Up Sign Up
Password Reset Password Reset

JavaScript Validation

  • All JavaScript files were passed through the official JSHint validator.
File Image
main.js main.js

PEP8 Code Institute Python Linter Validation

  • All Python files were passed through the Code Institute PEP8 validator.

Velotronix project app

File Result
settings.py PEP8 Linter
urls.py PEP8 Linter
views.py PEP8 Linter

Profiles app

File Result
admin.py PEP8 Linter
apps.py PEP8 Linter
forms.py PEP8 Linter
models.py PEP8 Linter
urls.py PEP8 Linter
views.py PEP8 Linter

Products app

File Result
admin.py PEP8 Linter
apps.py PEP8 Linter
forms.py PEP8 Linter
models.py PEP8 Linter
urls.py PEP8 Linter
views.py PEP8 Linter

Payment app

File Result
admin.py PEP8 Linter
apps.py PEP8 Linter
forms.py PEP8 Linter
models.py PEP8 Linter
urls.py PEP8 Linter
signals.py PEP8 Linter
views.py PEP8 Linter
webhooks.py PEP8 Linter
webhook_handler.py PEP8 Linter

Home app

File Result
urls.py PEP8 Linter
views.py PEP8 Linter

Cart app

File Result
context.py PEP8 Linter
urls.py PEP8 Linter
views.py PEP8 Linter

About app

File Result
admin.py PEP8 Linter
apps.py PEP8 Linter
forms.py PEP8 Linter
models.py PEP8 Linter
urls.py PEP8 Linter
views.py PEP8 Linter

Manual Testing

Devices and browsers used for testing

This e-commerce website was tested on multiple devices and browsers. All tests were performed in private browsing mode.

Device Browser Result
Dell Windows 10 desktop computer Google Chrome Works as expected
Dell Windows 10 desktop computer Microsoft Edge Works as expected
Dell Windows 10 desktop computer Mozilla Firefox Works as expected
Dell Windows 10 desktop computer Opera Works as expected
HP Windows 11 laptop 13" Screen Google Chrome Works as expected
HP Windows 11 laptop 13" Screen Microsoft Edge Works as expected
HP Windows 11 laptop 13" Screen Mozilla Firefox Works as expected
Apple iPhone 12 Safari Works as expected
Apple iPhone 12 Google Chrome Works as expected
Apple iPhone 12 Mozilla Firefox Works as expected
Apple iPhone 13 Safari Works as expected
Apple iPad 10th generation Safari Works as expected

User Stories Testing

Expectation Solution Image
As a user I want to be able to create an account The user can create an account by clicking on the sign up button in the navigation bar. Sign Up
As a user, I want to be able to view the site on any device I choose so that I can shop on the go. The website is fully responsive and works on all devices. Responsive
As a user, I want to be able to log in and out of my account so that I can access my profile. The user can log in and out of their account by clicking on the login/logout button in the navigation bar. Login
As a user, I want to be able to reset my password if I forget it so that I can access my account. The user can reset their password by clicking on the forgot password button on the login page. Forgot Password
As a user, I want to be able to find the products I am looking for easily so that I can find what I want quickly. The user can find the products they are looking for by using the search bar in the navigation bar. Search
As a user, I want to be able to view the details of a product so that I can decide if I want to purchase it. The user can view the details of a product by clicking on the product image or the product name. Product Details
As a user, I want to be able to add a product to my shopping bag so that I can purchase it. The user can add a product to their shopping cart by clicking on the add to cart button on the product details page. Add to cart
As a user, I want to be able to edit the quantity of a product in my shopping bag so that I can purchase the quantity I want. The user can edit the quantity of a product in their shopping cart by clicking on the quantity field and changing the number. Edit Quantity
As a user, I want to be able to delete a product from my shopping bag so that I can remove it if I change my mind. The user can delete a product from their shopping cart by clicking on the remove button. Remove
As a user, I want to be able to view my shopping bag so that I can see the total cost of my purchase. The user can view their shopping cart by clicking on the shopping cart icon in the navigation bar. Shopping Cart
As a user, I want to be able to checkout securely so that I can safely purchase my items. The user can checkout securely by clicking on the checkout button in the shopping cart. Checkout
As a user, I want to be able to view my order history so that I can see what I have purchased in the past. The user can view their order history by clicking on the profile button in the navigation bar. Profile
As a user, I want to be able to add or edit my billing and shipping information so that I can easily checkout. The user can add or edit their billing and shipping information by clicking on the profile button in the navigation bar. Profile
As a user, I want to be able to search for a product by name or description so that I can find what I want quickly. The user can search for a product by name or description by using the search bar in the navigation bar. Search
As a user, I want to be able to add a product to the favorites list so that I can purchase it later. The user can add a product to their favorites list by clicking on the heart icon on the product details page. Add to favorites
s a user, I want to be able to view my favorites list so that I can see what I have saved. The user can view their favorites list by clicking on the profile button in the navigation bar. Profile
As a user, I want to be able to remove a product from my favorites list so that I can remove it if I change my mind. The user can remove a product from their favorites list by clicking on the heart icon. Remove

Home Page Testing.

Action Expected Result Actual Result Image
Click on the logo in the navigation bar The user is redirected to the home page. Works as expected.
Enter a search term in the search bar The user is redirected to the search results page. Works as expected.
! User clicks on the login button in the navigation bar The user is redirected to the login page. Works as expected.
User clicks on the sign up button in the navigation bar The user is redirected to the sign up page. Works as expected.
User clicks on the shopping cart icon in the navigation bar The user is redirected to the shopping cart page. Works as expected.
User clicks on the profile icon in the navigation bar The user is redirected to the profile page. Works as expected.
User clicks on the logout button in the navigation bar The user is logged out and redirected to the home page. Works as expected.
User selects dropdown navigation menu item in the navigation bar Dropdown menu opens with relevant links. Works as expected.
User clicks on any of the navigation links in the dropdown menu The user is redirected to the relevant page. Works as expected.
User clicks on the "About Us" link The user is redirected to the about page. Works as expected.
User clicks on shop email address on the footer The user's email client opens with the shop email address in the "To" field. Works as expected.
User clicks on the Facebook icon on the footer The user is redirected to the business Facebook page. Works as expected.
User clicks on the privacy policy link on the footer The user is redirected to the privacy policy page. (about page) Works as expected.
User enters their email address in the newsletter sign up form If not on list already the user is added to the mailing list and a success message is displayed. Works as expected.

All Products Page Testing.

  • All pages are the same with only sorting and filtering options changing.
  • The Navigation bar and footer are the same as on the home page.
Action Expected Result Actual Result Image
User hovers the cursor over the product card The product card gets overlay with a semi-transparent layer and "Click for more" button appears. Works as expected.
User clicks on the product card The user is redirected to the product details page. Works as expected.
On the top of the page user can see the number of products found The number of products found is displayed and it links back to all products page. Works as expected.
User clicks on the "Arrow down" icon in the sorting dropdown menu The sorting options are displayed. Works as expected.

About Page Testing.

  • The Navigation bar and footer are the same as on the home page.
Action Expected Result Actual Result Image
If user is authenticated and admin The user can see the edit button that redirects to the edit about page. Works as expected.
When user fills the contact form and clicks on the submit button Success message is displayed, page is reloaded and form is cleared. Works as expected.
When user fills out the faq form and clicks on the submit button Success message is displayed, page is reloaded and form is cleared. Works as expected.

Product Details Page Testing.

  • The Navigation bar and footer are the same as on the home page.
Action Expected Result Actual Result Image
User clicks on the product image The image is displayed in a new window. Works as expected.
clicks on the quantity field + or - buttons The quantity is increased or decreased by 1. Works as expected.
User clicks on the "Add to cart" button The product is added to the shopping cart and a success message is displayed. Works as expected.
User clicks on the "Add to favorites" button The product is added to the favorites list and a success message is displayed. Works as expected.
User clicks on the "remove from favorites" button The product is removed from the favorites list and a success message is displayed. Works as expected.
User clicks on the "keep shopping" button The user is redirected to the all products page. Works as expected.

Product Management Page Testing.

  • The Navigation bar and footer are the same as on the home page.
Action Expected Result Actual Result
User clicks on the "Add Product" navigation link The user is redirected to the add product page. Works as expected.
User clicks on the edit/delete products link The user is redirected to the edit/delete products page. Works as expected.
on "Add Product" page user clicks on the "Cancel" button The user is redirected to the product management page. Works as expected.
on "Add Product" page user clicks on the "Add Product" button The product is added to the database and the user is redirected to the product management page and a success message is displayed. Works as expected.
on "Edit/Delete Products" page user clicks on the "Edit" button The user is redirected to the edit product page. Works as expected.
on "Edit/Delete Products" page user clicks on the "Delete" button The product is deleted or hidden from the database and the user is redirected to the product management page and a success message is displayed. Works as expected.
on the bottom of "edit/delete products" page when product deleted if user clicks on un-hide button Product is made visible again and success message is displayed. Works as expected.

User Profile Page Testing.

- The Navigation bar and footer are the same as on the home page.
- Page only available to authenticated users.
Action Expected Result Actual Result
User fills out the billing information and click on the "Update Information" button The billing information is updated and a success message is displayed. Works as expected.
If there is favorites, a favorites table is displayed, User clicks on the "remove from favorites" button The product is removed from the favorites list and a success message is displayed. Works as expected.
user clicks on the "add to cart" button The product is added to the shopping cart and a success message is displayed. Works as expected.
User clicks on the order number The user is redirected to the product details page. Works as expected.

Shopping Cart Page Testing.

  • The Navigation bar and footer are the same as on the home page.
Action Expected Result Actual Result
User clicks on the shopping cart icon in the top navigation bar The user is redirected to the shopping cart page. Works as expected.
when no products in the shopping cart user is show empty shopping cart page The user is shown empty shopping cart page. Works as expected.
When items in the shopping cart user is shown shopping cart page with products The user is shown shopping cart page with products. Works as expected.
User clicks on the "keep shopping" button The user is redirected to the all products page. Works as expected.
User clicks on the "checkout" button The user is redirected to the checkout page. Works as expected.
User clicks on the "remove" button The product is removed from the shopping cart and a success message is displayed. Works as expected.
User clicks on the "update" button The product quantity is updated and a success message is displayed. Works as expected.
user clicks on the + or - buttons in the quantity field The product quantity is updated and a success message is displayed. Works as expected.

Checkout Page Testing.

  • The Navigation bar and footer are the same as on the home page.
Action Expected Result Actual Result
User clicks on the "adjust cart" button The user is redirected to the shopping cart page. Works as expected.
User clicks on the "complete order" button The user is redirected to the checkout success page and a success message is displayed. Works as expected.

Logout Page Testing.

  • The Navigation bar and footer are the same as on the home page.
Action Expected Result Actual Result
User clicks on the "logout" button The user is logged out and redirected to the home page. Works as expected.
User clicks on the "back" button The user is redirected to the previous page. Works as expected.

Login Page Testing.

  • The Navigation bar and footer are the same as on the home page.
Action Expected Result Actual Result
User clicks on the "login" button The user is logged in and redirected back to the page they were on. Works as expected.
User clicks on the "forgot password" link The user is redirected to the password reset page. Works as expected.
User clicks on the "sign up" link within the login form The user is redirected to the sign up page. Works as expected.

Password Reset Page Testing.

  • The Navigation bar and footer are the same as on the home page.
Action Expected Result Actual Result
User enters their email address and clicks on the "reset password" button The user is sent an email with a link to reset their password. Works as expected.

Sign Up Page Testing.

  • The Navigation bar and footer are the same as on the home page.
Action Expected Result Actual Result
User enters valid information and clicks on the "sign up" button Email confirmation is sent to the user and the user is redirected to the login page. Works as expected.
User enters invalid information and clicks on the "sign up" button The user is redirected to the sign up page and an error message is displayed. Works as expected.
User clicks on the "login" link within the sign up form The user is redirected to the login page. Works as expected.

Back to top ⇧

Go back to README.md