You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following sections list a number of manual tests undertaken to ensure the site operates according to details listed under Scope and Structure in the README file. Specific dev goals/user stories can viewed (where appropriate) by hovering over the numbers listed under 'Ref(s)' in the tables below; clicking these links will open the relevant section in the README file.
User Administration
These tests check the sign up, sign in, and sign out functionality of the site. The superuser ms_superadmin and its related password (not given here for security of the API) along with the general user of username: testname, password: test#123 have specifically been created to access and function within the backend in order to determine the outcome of these tests. Within the tables below, the descriptor 'valid details' indicates that the following is expected:
Required fields (*) are not left blank
Invalid values/formats have not been added to a field
Scroll down and select tick box beside user to be deleted
Select 'Delete selected users' from Action dropdown above the user list
Click 'Go' button
Scroll down and click 'Yes I'm sure' button
Admin directed back to list of users
Deleted user no longer appears on list
Deleted user also removed from 'User profiles' page (click 'User profiles' link to view)
Deleted user also removed from 'Equipment profiles' page (click 'Equipment profiles' link to view)
Pass
Get, Post, Put & Delete (CRUD) Functionality
These tests determine if an admin is able to successfully - or otherwise - create (post), view (get), update (put) and/or delete photos, stars, comments, or gear/account info through the backend admin site. In all test cases, one must first sign in to the admin site before completing any of the other steps listed (superuser ms_superadmin and its related password - not given here for security of the API - have specifically been registered for this purpose), while the descriptor 'valid details' indicates that the following is expected:
Required fields (*) are not left blank
Invalid values/formats have not been added to a field
Scroll down and select tick box beside star to be deleted
Select 'Delete selected stars' from Action dropdown above the star list
Click 'Go' button
Scroll down and click 'Yes I'm sure' button
Admin directed back to list of stars
A message saying "Successfully deleted 1 star" appears above the comment list
Deleted star no longer appears on list
Pass
PEP8 Validator Testing
All files have been passed through the Code Institute PEP8 Linter. The only warnings given were for the settings.py file which contains a small number of long lines (i.e. greater than 80 characters); as this is from code implemented by Django itself, these lines will be left unchanged.
Bugs
There are no known bugs in the current deployment of the site. A number of bugs were found, added to the Kanban workflow, and corrected during development. A brief summary of the backend bugs are provided below:
Type
Issue
Detail
Solution
Result
Data
Database won't migrate
After creating the Stars model and serializer, attempted to run migrations using python manage.py makemigrations and python manage.py migrate. Terminal displays a UNIQUE constraint not valid message.
Delete migrations
Delete and recode Stars app/model
Rerun migrations
Fixed
Data
Photos POST function creating IntegrityError
When trying to create upload a photo using the POST function the message django.db.utils.IntegrityError: NOT NULL constraint failed: photos_photo.user_id appears
Correct syntax of def perform_create() method (incorrectly names as def create_photo)
Fixed
Connection
API not accepting data from Frontend
When attempting to sign up a new user via the frontend, an error is logged to the console regarding blocked CORS policy and the React 'white screen' is shown
Added CLIENT_ORIGIN and CLIENT_ORIGIN_DEV variables to the env.py file
Added code block to settings.py (see under table)
Fixed
Connection
API not sending profile_id and profile_image variables
When trying to display a user avatar and receive their id on the frontend, a broken image link is shown in the navbar along with an undefined value in developer tools
Removed underscore from user_profile and equipment_profile in all serializer files
Fixed
Data
Photo Upload/Edit Form not saving details
Date and Time fields displaying errors within the frontend console with regard to null values
Removed null="True" on date and time fields in photos model