As customer
I want the app to show the latest remote salons
So I can always get the latest salon details
Given the customer has connectivity
And customer requests to see salons
Then the app should display the available salon list from remote
And replace the cache with the new salon
As an offline customer
I want the app to show the latest saved salons
So I can always see the salon details
Given the customer doesn't have connectivity
And there’s a cached version of the salons
And the cache is less than seven days old
When the customer requests to see the salons
Then the app should display the latest salons saved
Given the customer doesn't have connectivity
And there’s a cached version of the salons
And the cache is older than seven days old
When the customer requests to see the salons
Then the app should show empty list and delete cache
Given the customer doesn't have connectivity
And the cache is empty
When the customer requests to see the salons
Then the app should show empty list
- URL
- Execute "Load Salons" command with above data.
- System downloads data from the URL.
- System validates downloaded data.
- System delivers salon data.
- System delivers invalid data error.
- System delivers connectivity error.
- Execute "Load salons" command.
- System retrieves salon data from cache.
- System validates cache is less than seven days old.
- System creates salon list from cached data.
- System delivers salon list.
- System delivers error.
- System delivers no salons.
- System delivers no salons.
- Execute "Validate Cache" command with above data.
- System retrieves salon data from cache.
- System validates cache is less than seven days old.
- System deletes cache.
- System deletes cache.
- Salons
- Execute "Save salons" command with above data.
- System deletes old cache data.
- System encodes salons.
- System timestamps the new cache.
- System saves new cache data.
- System delivers success message.
- System delivers error.
- System delivers error.
Property | Type |
---|---|
id |
UUID |
name |
String |
location |
String |
phone |
String (optional) |
openTime |
Float |
closeTime |
Float |
GET *url* (TBD)
200 RESPONSE
{
"salons": [
{
"id": "a UUID",
"name": "a name",
"location": "a location",
"phone": "a phone number",
"open_time": 9.30
"close_time": 22.30,
},
{
"id": "another UUID",
"name": "another name",
"location": "another location",
"open_time": 10.30
"close_time": 20.30,
},
{
"id": "even another UUID",
"name": "even another name",
"location": "even another location",
"open_time": 8.00
"close_time": 14.00,
},
{
"id": "yet another UUID",
"name": "yet another name",
"location": "yet another location",
"open_time": 11.00
"close_time": 16.00,
}
...
]
}
As customer
I want the book an appointment with a salon on my preferred date and time slot
so that I can secure a convenient time for my service.
Given the customer has connectivity
And customer selects a preferred date and time slot
When the customer requests to book an appointment with a salon
Then the app should confirm the availability of the selected salon and time slot from the remote
And book the appointment for the customer
And update the cache with the new appointment details
Given the customer does not have connectivity
And the customer selects a preferred date and time slot
When the customer attempts to book an appointment with a salon
Then the app should display an error message indicating that booking requires an internet connection
Property | Type |
---|---|
id |
UUID |
time |
Date (ISO8601) |
phone |
String |
email |
String (optional) |
note |
String (optional) |
POST *url* (TBD)
REQUEST
{
"salonId": "a UUID",
"appointmentTime" : "2024-10-20T11:24:59+0000",
"phone": "a phone number",
"email": "an email id",
"notes": "a note",
}
201 RESPONSE
{
"salonId": "a UUID",
"appointmentTime" : "2024-10-20T11:24:59+0000",
"phone": "a phone number",
"email": "an email id",
"notes": "a note",
}
As customer
I want the app to show the the appoinments I booked
So I can always view the latest appointment details
Given the customer has connectivity
And customer requests to see his booked appointments
Then the app should display the appointment list from remote
And replace the cache with the new appointments
As an offline customer
I want the app to show the saved appointment bookings
So I can always see the booked appintment details
Given the customer doesn't have connectivity
And there’s a cached version of the appointments
When the customer requests to see the booked appointments
Then the app should display the appointments saved
Given the customer doesn't have connectivity
And the cache is empty
When the customer requests to see the booked appointments
Then the app should show empty list
- URL
- Execute "Load Appointments" command with above data.
- System downloads data from the URL.
- System validates downloaded data.
- System delivers appointment data.
- System delivers invalid data error.
- System delivers connectivity error.
- Execute "Load Appointments" command.
- System retrieves appointment data from cache.
- System creates appointment list from cached data.
- System delivers appointment list.
- System delivers error.
- System delivers no appointments.
- Appointments
- Execute "Save appointments" command with above data.
- System deletes old cache data.
- System encodes appointments.
- System saves new cache data.
- System delivers success message.
- System delivers error.
- System delivers error.
GET *url* (TBD)
200 RESPONSE
{
"appointments": [
{
"salonId": "a UUID",
"appointmentTime" : "2024-10-20T11:24:59+0000",
"phone": "a phone number",
"email": "an email id",
"notes": "a note"
}
{
"salonId": "another UUID",
"appointmentTime": "2024-10-21T11:24:59+0000",
"phone": "another phone number",
"email": "another email id",
"notes": "another note"
},
{
"salonId": "even another UUID",
"appointmentTime": "2024-10-22T11:24:59+0000",
"phone": "even another phone number",
"email": "even another email id",
"notes": "even another note"
},
{
"salonId": "yet another UUID",
"appointmentTime": "2024-10-23T11:24:59+0000",
"phone": "yet another phone number",
"email": "yet another email id",
"notes": "yet another note"
}
...
]
}