- Assumption: User is logged in.
- Verify:
- The List of Stories is visible.
- The ListStoryActivity opens successfully.
- RecyclerView scrolls properly.
- SwipeRefreshLayout is displayed.
- Button to add a story is visible.
- Button to view stories on Google Map is visible.
- Perform a click action on the first item in the RecyclerView.
- Assumption: User is logged in.
- Verify:
- The List of Stories is visible.
- Perform a click action on the first item in the RecyclerView.
- Story description is displayed.
- Sender's name is displayed.
- Posting time of the story is displayed.
- [Further verification steps are needed.]
- Assumption: User is logged in and has allowed the application to use location services.
- Verify:
- The List of Stories is visible.
- Perform a click action on the button to view stories on Google Map.
- Map is displayed.
- Assumption: User is logged in.
- Verify:
- The List of Stories is visible.
- Perform a click action on the button to post a story.
- Image preview area is displayed.
- Button to add location is visible.
- Button to open the camera is visible.
- Button to open the gallery is visible.
- Button to upload story is displayed.
[Check for successful data retrieval of stories from the network]
- Verify:
- Stories are displayed.
- A story containing the keyword "Zekken" is displayed.
- Scrolling is functional.
- A story containing the keyword "ya" is displayed.
[Check for error in data retrieval of stories from the network]
- Verify:
- Stories are displayed if available in the local database.
- TextView "Oops.. something went wrong. Check your connection." is displayed.
- When the
register()
function is called, it should not return a null value. - When the
login()
function is called, it should not return a null value and should return user details including name, user ID, and token. - When the
getStoryMap()
function is called, it should not return a null value and should return story data. - When the
postStory()
function is called, it should not return a null value. - When the
getPagingStories()
function is called, it should not return a null value and should returnPagingData
.
- When successfully adding a story:
ResultResponse.Success
should be true.expectedResponse
should equalResultResponse.Success(dummyResponse)
.expectedResponse
andactualResponse
should be the same.
- When failing to add a story:
ResultResponse.Error
should be false.expectedResponse
should equalResultResponse.Error(dummyResponseError)
.actualResponse
andResultResponse.Error
should be the same.
- When successfully displaying story data:
expectedStory
should equaldummyStory
.actualStory
should equalitemStory
.expectedStory
andactualStory
should be the same.
- When successfully retrieving a list of stories:
- Ensure that the data is not empty.
- Ensure that the size of the actual data matches that of the dummy data.
- When successfully logging in:
ResultResponse.Success
should be true.- Ensure that
actualResponse
is not empty. actualResponse
should equalResultResponse.Success
.dummyResult
should matchactualResponse
, meaning the data returns the same values for user name, user ID, and token.
- When failing to log in:
ResultResponse.Error
should be false.- Ensure that
actualResponse
is not empty. actualResponse
should equalResultResponse.Error
, meaning it returns the same error data.
- When successfully retrieving user data from local storage:
- Ensure that the local data is not empty.
- Local data should match
dummyUserModel
.
- When successfully logging out:
- The logout process with
mainViewModel
should matchuserPreference
.
- The logout process with
- When successfully retrieving story map data:
ResultResponse.Success
should be true.- Ensure that
actualStory
is not empty. actualStory
should equalResultResponse.Success
.- Ensure the size of the actual data (
actualStory
) matchesdummyMaps
.
- When failing to retrieve story map data:
ResultResponse.Error
should be false.- Ensure that
actualStory
is not empty. actualStory
should equalResultResponse.Error
.
- When successfully registering:
ResultResponse.Success
should be true.- Ensure that
actualResponse
is not empty. actualResponse
should equalResultResponse.Success
.- Ensure that
dummyResponse
matchesactualResponse
.
- When failing to register:
ResultResponse.Error
should be false.- Ensure that
actualResponse
is not empty. actualResponse
should equalResultResponse.Error
.