-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added unit test for SyncStatusFragment #2572
Added unit test for SyncStatusFragment #2572
Conversation
/gcbrun |
/gcbrun |
?: run { | ||
return | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove this?
/** | ||
* Confirming the Toolbar visibility. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test name is pretty obvious. We don't need extra comments here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for all or just this one?
* Confirming the Toolbar visibility. | ||
*/ | ||
@Test | ||
fun `MaterialToolbar should be Displayed`() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we change it to Toolbar should be displayed
?
* Confirming the SyncItem List visibility. | ||
*/ | ||
@Test | ||
fun `SyncItem List should Displayed`() = runWithTestDispatcher { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to "Sync items should be displayed"
* Without Data, the list will not be visible on the screen. | ||
*/ | ||
@Test | ||
fun `SyncItem List should Not Displayed`() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as previous comment.
surveyRepository.selectedSurveyId = SURVEY.id | ||
advanceUntilIdle() | ||
|
||
composeTestRule.onNodeWithTag("sync list").assertIsDisplayed() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also verify the total count of items shown?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this needs to be done in next part of this pr, as this required a bit of extra work
/gcbrun |
Fixes #2571
Part 1 PR for this screen
@shobhitagarwal1612 PTAL?