# Screen caching for offline access

## Description:

If the user visits a screen whilst online, and then returns whilst offline, the screen will load using cached data.

## Step-by-Step Procedure:

1. Login as admin.
2. Click on "Courses."
3. Click on the "+ Course" button.
4. Click on the "Add a new course" button.
5. Enter a course name.
6. Click on the "Description" field.
7. New text block appears.
8. Enter the description.
9. Click on the "Done" button.
10. Click "Save" button to save the course.
11. Click on the "Courses"
12. Click on the course name.
13. Click on the "Members" tab.
14. Click on the "Add a teacher" button
15. Click on "Add a new person" button
16. Enter the teacher's first name, last name and Gender.
17. Click on the "Save" button and save the person details.
18. Click on the "Save" button to save the enrollment details.
19. Click on the teacher name.
20. Click on the "View profile" button.
21. Click on the "Create account" button.
22. Enter the username.
23. Enter the password.
24. Click on the "Save button"
25. Click on the "Courses"
26. Click on the course name.
27. Click on the "Members" tab.
28. Click on the "Add a student" button
29. Click on "Add a new person" button
30. Enter the student's first name, last name and Gender.
31. Click on the "Save" button and save the person details.
32. Click on the "Save" button to save the enrollment details.
33. Click on the student name.
34. Click on the "View profile" button.
35. Click on the "Create account" button.
36. Enter the username.
37. Enter the password.
38. Click on the "Save button"
39. Clear the app storage. 
40. Login to the app using the student username and password. 
41. Verify the student able to see the course.
42. Click on "Members".
43. Verify student able to see all members in the course.
44. Close the app
45. Switch off the wifi/data on the device.
46. Open the app
47. Return to the previously visited screen while offline. 
48. Verify the user able to see the course and members.
49. Verify that the screen loads successfully using cached data.
50. Check that no error messages related to connectivity are displayed. 
51. Reconnect the device to the internet and refresh the screen. 
52. Verify that the screen updates with the latest data from the server.
