-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
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.
I have left a small comment on a possible move of the function to usersRepo. Otherwise, PR looks good to me!
@@ -37,8 +60,8 @@ class ScoreBoardActivity : AppCompatActivity() { | |||
} | |||
} | |||
|
|||
private fun loadPlayers() { | |||
dbRef.orderByChild("ranking") | |||
private fun loadPlayersSortedBy(order: String) { |
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.
UsersRepo contains all the firebase calls connected with "users", should this function be moved there?
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.
I see what you mean, however, It's more logical for me to put it here because this function is only used locally in scoreboard activity to load the data into the scoreboard.
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.
👍 Just some questions left in comments
R.id.btsButton -> sortedBy = "ranking" | ||
R.id.kpopButton -> sortedBy = "ranking" | ||
R.id.imagDragonsButton -> sortedBy = "ranking" | ||
R.id.billieEilishButton -> sortedBy = "ranking" | ||
R.id.rockButton -> sortedBy = "ranking" | ||
R.id.topTracksButton -> sortedBy = "ranking" |
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.
R.id.btsButton -> sortedBy = "ranking" | |
R.id.kpopButton -> sortedBy = "ranking" | |
R.id.imagDragonsButton -> sortedBy = "ranking" | |
R.id.billieEilishButton -> sortedBy = "ranking" | |
R.id.rockButton -> sortedBy = "ranking" | |
R.id.topTracksButton -> sortedBy = "ranking" | |
R.id.btsButton -> sortedBy = "ranking" | |
R.id.kpopButton -> sortedBy = "ranking" | |
R.id.imagDragonsButton -> sortedBy = "ranking" | |
R.id.billieEilishButton -> sortedBy = "ranking" | |
R.id.rockButton -> sortedBy = "ranking" | |
R.id.topTracksButton -> sortedBy = "ranking" |
Could store "ranking" into string.xml ? easier to modify after
@Test | ||
fun topBtnClick() { | ||
onView(withId(R.id.topTracksButton)).perform(click()) | ||
} | ||
|
||
@Test | ||
fun kpopBtnClick() { | ||
onView(withId(R.id.kpopButton)).perform(click()) | ||
} | ||
|
||
@Test | ||
fun billieEilishButtonClick() { | ||
onView(withId(R.id.billieEilishButton)).perform(click()) | ||
} | ||
|
||
@Test | ||
fun imagineDragonsButtonClick() { | ||
onView(withId(R.id.imagDragonsButton)).perform(click()) | ||
} | ||
|
||
@Test | ||
fun btsButtonClick() { | ||
onView(withId(R.id.btsButton)).perform(click()) | ||
} |
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.
Here it clicks, but does not miss a verification ? What should it test ?
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.
Normally, the verification of each should be the same as in rockBtnShouldSetUpRecycleView() and rockBtnShouldEnableRecycleViewClick(), but they are all testing the same lines of code, so to speed up CI and have the coverage rate, I just do click on each of them without the actual verification.
} | ||
|
||
@Test | ||
fun rockBtnShouldSetUpRecycleVie() { |
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.
fun rockBtnShouldSetUpRecycleVie() { | |
fun rockBtnShouldSetUpRecycleView() { |
I think this is a typo
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.
Does this typo still exist? I remember fixing it in commit 5b54240
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.
Just found a typo; otherwise all good 😀
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.
👍 nice work !
Code Climate has analyzed commit 9db474a and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (80% is the threshold). This pull request will bring the total coverage in the repository to 87.4% (0.1% change). View more on Code Climate. |
No description provided.