-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
55414ec
to
d22d274
Compare
*/ | ||
|
||
private fun showDialog(title: String, hint: String, id: Int, textId: Int) { | ||
private fun showDialog(title: String, hint: String, id: Int, textId: Int, name: 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.
Method showDialog
has 5 arguments (exceeds 4 allowed). Consider refactoring.
Linked auth to user profile and edit username and handle to firebase. Commented the image loading for now to be able to test some parts, will add it next week when I work on user Sign Up form. Deleted unnecessary files that were there before firebase implementation. |
// CoroutineScope(Dispatchers.Main).launch { | ||
// val task = async(Dispatchers.IO) { | ||
// val bit = BitmapGetterApi.download("https://"+user.image) | ||
// bit.get() | ||
// } | ||
// val bm = task.await() | ||
// findViewById<ImageView>(R.id.avatar).setImageBitmap(bm) | ||
// } |
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've seen your explanation about commenting the image load. Just wanted to comment on it so that we don't forget it in the future, if we go over the PR's
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.
Great job! In AuthenticationActivity at lines 89, 94 and 99 there are hardcoded strings. If you can, putting them into the strings.xml resource file and using them like that would be amazing.
@@ -127,9 +141,9 @@ class AuthenticationActivityTest { | |||
onView(withId(R.id.username)).perform(ViewActions.typeText(username), closeSoftKeyboard()) | |||
onView(withId(R.id.password)).perform(ViewActions.typeText(password), closeSoftKeyboard()) | |||
onView(withId(R.id.createAcc)).perform(click()) | |||
Thread.sleep(sleepTime) | |||
onView(withId(R.id.email)).check(matches(withText(randomInt.toString().plus("@gg.com")))) | |||
Thread.sleep(1000) |
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.
Maybe change to 1000 the sleepTime constant you defined and use that when calling Thread.sleep.
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.
will do!
intent.putExtra("userProfile", inputProfile) | ||
val inputProfile = UserProfile("@lisa", "Lalisa Bon","bit.ly/3IUnyAF", "[email protected]", 12, 8, 29, 0) | ||
val intent = Intent(ApplicationProvider.getApplicationContext(), ProfileActivity::class.java) | ||
intent.putExtra("email", inputProfile.email) | ||
val scn: ActivityScenario<ProfileActivity> = ActivityScenario.launch(intent) | ||
Thread.sleep(3_000) |
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.
Maybe use a constant for Thread.sleep calls.
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.
Looks good to me!
Implemented your proposals :) |
Code Climate has analyzed commit 5bca5eb and detected 2 issues on this pull request. Here's the issue category breakdown:
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 90.6% (-0.3% change). View more on Code Climate. |
No description provided.