-
- Visit W3 Validator.
-
- Open workspace and copy the contents of
base.html
.
- Open workspace and copy the contents of
-
- Navigate back to HTML Validator and paste clipboard contents into the text area.
-
- Submit the form.
-
- Carefully review all warnings and errors.
-
- Disregard errors caused by Django template blocks, etc.
-
- Fix all errors related to HTML (excluding errors caused by Django template language).
-
- Repeat steps 1-4 to ensure all possible errors have been removed from the base template.
-
- Follow steps 1-7 for the following custom Django templates:
CSS Validation Testing
- Date: July 8, 2021
- Issue: 'CSS Validation Service Testing'
-
- Open workspace and copy the contents of base.css.
-
- Navigate back to CSS Validator and paste clipboard contents into the text area.
-
- Submit the form.
-
- Carefully review all warnings and errors.
-
- Repeat test if/when any changes are made to the stylesheet.
Database Conflict Test #1
- Date: June 28, 2021, 4:38pm
- Issue: 'Build failed after replacing Django model fields'
-
- Open
hue-alissa.herokuapp.com
in a web browser
- Open
-
- Navigate to 'hue-alissa.herokuapp.com/admin' and click on 'Orders'
-
- Observe an error message in the admin caused by missing fields.
-
- Retrace recent steps that were taken to edit the database.
-
- Determine problem was most likely caused by manually deleting migration files and only performing `zero-out migration on the SQLite (development) database.
-
- Conclude that this activity led to corruption.
-
- Determine the best course of action and take the following steps:
- Provision new PostgreSQL database on Heroku.
- Connect the database to manage.py
- Load data into the new database.
- Determine the best course of action and take the following steps:
-
Order Model Timestamp Test #1
- Issue: 'Receipts for orders incorrectly timestamped'
-
- Open
hue-alissa.herokuapp.com
in a web browser
- Open
-
- Navigate to 'hue-alissa.herokuapp.com/admin' and click on 'Shop'
-
- Add products to the shopping cart and proceed to checkout for the test.
-
- Fill out the form and select, 'Complete Order'.
-
- Observe order confirmation is displayed upon submitting the order form.
-
- Review
checkout_success.html
and notice outputted 'time' is 4 hours ahead.
- Review
-
- Ensure order date is accurate and check order summary for additional errors.
-
- Open my IDE and visit
checkout/models.py
to ensure thedate
field is set up properly.
- Open my IDE and visit
-
- Use Google, Stack Overflow & Django's documentation to learn about DateTime and timezone settings.
-
- Update the DateTime import on the top of
checkout/models.py
to read:import datetime
now = datetime.datetime.now()
- Update the DateTime import on the top of
-
- Complete steps 1 - 7 again and observe that time is still incorrect (displaying one hour early now).
-
- Review Django''s documentation again.
-
- Decide to set timezone across the project by updating
settings.py
with timezone setting:USE_TZ
= TrueTIME_ZONE = 'America/New_York'
- Decide to set timezone across the project by updating
-
Build Failed Test #2
- Date: June 30, 2021
-
- Open
hue-alissa.herokuapp.com
in a web browser
- Open
-
- Observe Heroku 'Application Error' is rendering on the front-end of the app.
-
- Open a terminal and enter
heroku logs -tail
.
- Open a terminal and enter
-
- Read through the error log.
-
- Read error, "storages module could not be found".
-
- Visit,
settings.py
file and ensure storages are properly configured.
- Visit,
-
- Visit Git repository on GitHub.
-
- Inspect the commit that corresponds with the last successful build on Heroku.
-
- Review entire commit history from that day, paying close attention to any environmental changes that may have led to the crash.
-
- Visit
Google
and enter search the topic.
- Visit
-
- Observe a post on Stack Overflow, advising to ensure Django-storages was/is not installed outside of a Django virtual environment.
-
- Visit the command line and enter
pip freeze
from my default bash profile.
- Visit the command line and enter
-
- Review the contents of requirements.txt
-
- Activate my virtual environment and enter
pip freeze
.
- Activate my virtual environment and enter
-
- Review the contents of requirements.txt and notice
django-storages
is not listed in the file.
- Review the contents of requirements.txt and notice
-
- Reinstall django-storages from my virtual environment.
-
- Freeze the requirements file.
-
- Save, commit and push these changes to Heroku.
-
Test #1: Setup Stripe CLI
- Date: July 10, 2021, 10:38am
- Objective: 'Setup Stripe CLI'
-
- Open terminal in my local development environment.
-
- Use Homebrew to install the Stripe CLI:
brew install stripe/stripe-CLI/stripe
- Use Homebrew to install the Stripe CLI:
-
- Login:
stripe login
- Login:
-
- Ensure the output includes a Stripe pairing code, then press "Enter" to open a browser and log in to Stripe.
-
- Run a test command to ensure setup was successful:
stripe customers create
.
- Run a test command to ensure setup was successful:
-
- Review raw Customer Object JSON output.
-
- Navigate to Stripe Dashboard and confirm that a new customer object has been created successfully.
-
Test #2: Use Stripe CLI to Test Webhook Endpoint
-
Date: July 10, 2021, 10:45am
-
Objective: 'Test Stripe webhook endpoint using Stripe CLI'
-
- Open terminal in local development environment.
-
- Enter
stripe listen
to begin listening for events.
- Enter
-
- Review output
Ready! Your webhook signing secret is whsec_##############
.
- Review output
-
- Forward events to my local server:
stripe listen --forward-to localhost:8000/checkout/wh/
- Forward events to my local server:
-
- Observe output with new signing secret.
-
- Open project in web browser and add products to shopping cart.
-
- Visit the checkout page.
-
- Head back to terminal window and observe output reads,
payment_intent.created
.
- Head back to terminal window and observe output reads,
-
- Fill out the payment form with Stripe test credit card credentials and click,
submit
.
- Fill out the payment form with Stripe test credit card credentials and click,
-
- Observe two new lines of output from STRIPE-CLI:
- 'payment_intent.succeeded'
- 'charge_succeeded'.
-
- Open Stripe developer dashboard and click, 'events.'
-
- Verify payment succeeded.
-
- Declare test, 'passed', proving that Stripe payment intents are being both created & completed successfully on the front & back end.
Test #3: Content Error
-
-
Date: July 10, 2021, 10:45am
-
Issue: 'Test webhook endpoint request from Stripe's dashboard is returning a 401 error'
-
- Visit Stripe 'Webhooks' section of dashboard and click 'Add Endpoint`.
-
- Configure the endpoint accordingly.
-
- Click,
Send test webhook
.
- Click,
-
- Observe a 401 error on Stripe:
Test webhook error: 401
- Observe a 401 error on Stripe:
-
- Review Stripe's documentation regarding content errors:
- "...the API servers might return a 401 if an invalid API key was provided" (https://stripe.com/docs/error-handling)
-
- Visit the 'Error Codes' section of Stripe's documentation and learn that a 400 error status code in this context is most likely the result of a missing or incorrect parameter:
- "4xx error status codes indicate an error because of the information provided (e.g., a required parameter was omitted)" (https://stripe.com/docs/error-codes)
- Visit workspace and review the contents of,
views.py
. - Notice,
client_secret
is still set totest secret
. - Refactor accordingly.
- Navigate to,
settings.py
and review all Stripe keys. - Notice that the keys in
settings.py
are improperly configured. - Repair key configurations.
- Mark test, 'passed'.
-