Live Chat ~ Testing Walkthrough - uchicago-cs/chigame GitHub Wiki
This page provides an example and walkthrough for testing the live chat features of Chigame. Since these features are newly introduced and involve creating various tables and relationships, we felt that a detailed guide would be beneficial.
Walkthrough 📖
- Create a Superuser
python manage.py createsuperuser
We will use this account to access the /admin
routes.
- Run chigame
python manage.py runserver
- Navigate to
/admin
and login with the new Superuser you created
- Create a new user
Once the message below is seen we are good to go:
Also add a username so we can find the user later:
- Verify/confirm that user's email (without truly doing so)
Click on "Add" and make sure to tick "Verified" when creating this record:
The email we use must be the same as the email used for our user.
We must also select the user:
- Create a chat and add the user to that chat
First, add the chat:
Now, get the ID of that chat:
The URL should be something like this: http://localhost:8000/admin/chat/livechat/2/change/
The number in the URL is our chat ID, keep note of this, as later we will be using it.
Then, add the user we created to the chat:
- Finally, navigate to
chat/{ID}
(replacing {ID} with the ID we took note of earlier, in our case:2
)
- Send a message to test that it works