As a user with an active internet connection
I want the app to load coffee places around me
So I can find a place to enjoy a cup of coffee.
Given the user has connectivity
When the user requests coffee places
Then the app should display coffee places nearby
And replace the cache with the new places
As an offline user
I want the app to show the latest saved places
So at least I have some places I can browse through
Given the user doesn't have connectivity
And there are places in the cache
And the cache is less than one day old
When the user requests to see places
Then the app should display the saved places
Given the user doesn't have connectivity
When the app displays the saved places
Then the user should see an offline indicator
Given the user doesn't have connectivity
And there are places in the cache
And the cache is one day old or more
When the user requests to see places
Then the app should display an error message
Given the user doesn't have connectivity
And the cache is empty
When the user requests to see places
Then the app should display an error message
GET /textsearch
200 RESPONSE
{
"results":
[
{
"formatted_address": "Some Address",
"geometry":
{
"location": { "lat": -33.8592041, "lng": 151.2132635 },
},
"icon": "icon.png",
"icon_background_color": "#FF9E67",
"icon_mask_base_uri": "restaurant_pinlet",
"name": "Restaurant Name",
"opening_hours": { "open_now": false },
"photos":
[
{
"height": 4032,
"html_attributions":
"photo_reference": "XXX",
"width": 3024,
},
],
"place_id": "XXX-Not_a_UUID",
"price_level": 4,
"rating": 4.5,
"types": ["restaurant", "point_of_interest", "food", "establishment"],
"user_ratings_total": 1681,
},
....
]
}