Users can only access offline screens if the required data is cached
Description
The offline screens should only show to the users if they have all of the required information to let users work with this screen offline. In case there's anything missing in the cache, we should let the user know that certain data is missing and not allow them to work with the screen. E.g. not showing empty dropdowns for required inputs.
Note: We should handle two cases:
There's nothing cached because there's nothing on the server as well
There's nothing cached because the application didn't manage to cache something yet
In case something is not cached because the application didn't manage to cache it yet, we should show an error on an attempt to enter the screen. It could read: "The data required to access this screen is not cached. We will fetch it once you are online again."
Attachments
1
Checklists
Activity
Show:
Alicja Baranowska April 6, 2021 at 1:46 PM
Tested with success
Verified cases:
There is no chance to see the empty reason dropdown
I run the reproduction steps for reasons, valid destinations, and valid sources - with success
When we for example go to Issue, delete reasons, go Home and refresh the page, next go offline and come back for Issue page- we can see the error message with is correct
Verified on:
Ubuntu 20.04
Google Chrome Browser Version 85.0.4183.83
Klaudia Pałkowska April 2, 2021 at 8:27 AM
QA Note: Please run the reproduction steps for reasons, valid destinations, and valid sources.
Klaudia Pałkowska April 2, 2021 at 8:25 AM
Code changes look good to me
Klaudia Pałkowska March 25, 2021 at 9:14 AM
I’ve found out that the following steps lead to the issue with missing reasons:
Log into the application and wait for the cache
Remove reasons from the local storage
Go offline to Stock Management > Issue > Make Issue screen (or any other stock screen)
The reasons are still displayed in the dropdown
Go online and move to the Home page or any different (not stock) and refresh page
Go offline again and move to any stock screen
Now you are able to access the screen but the reasons' dropdown is empty
It looks like we need to handle the situation when reasons are not cached in the local storage and the user is offline.
Done
Pinned fields
Click on the next to a field label to start pinning.
The offline screens should only show to the users if they have all of the required information to let users work with this screen offline. In case there's anything missing in the cache, we should let the user know that certain data is missing and not allow them to work with the screen. E.g. not showing empty dropdowns for required inputs.
Note: We should handle two cases:
There's nothing cached because there's nothing on the server as well
There's nothing cached because the application didn't manage to cache something yet
In case something is not cached because the application didn't manage to cache it yet, we should show an error on an attempt to enter the screen. It could read: "The data required to access this screen is not cached. We will fetch it once you are online again."