-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor Auth + Going forward score part 2 #190
Conversation
createAcc: Boolean, | ||
|
||
//TODO | ||
private fun startNewActivity(email: 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.
Similar blocks of code found in 2 locations. Consider refactoring.
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.
review in progress
app/src/main/java/ch/sdp/vibester/activity/AuthenticationActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/ch/sdp/vibester/activity/AuthenticationActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/ch/sdp/vibester/activity/AuthenticationActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/ch/sdp/vibester/activity/AuthenticationActivity.kt
Outdated
Show resolved
Hide resolved
* @param data intent returned from google sign in | ||
*/ | ||
fun googleActivityResult(requestCode: Int, resultCode: Int, data: Intent?, ctx: Context): String? { | ||
if (requestCode == 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.
request code 1000 appears more than once in different files, it might be useful to store it as a const and give it an appropriate name.
app/src/main/java/ch/sdp/vibester/auth/FireBaseAuthenticator.kt
Outdated
Show resolved
Hide resolved
…ity.kt Co-authored-by: jiabaow <[email protected]>
Co-authored-by: jiabaow <[email protected]>
Co-authored-by: jiabaow <[email protected]>
…ity.kt Co-authored-by: jiabaow <[email protected]>
Co-authored-by: jiabaow <[email protected]>
Co-authored-by: jiabaow <[email protected]>
Co-authored-by: jiabaow <[email protected]>
Co-authored-by: jiabaow <[email protected]>
…022-Vibester into maximezmt/refactorauthp2
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.
Thanks for this BIG refactoring/implementation.
As discussed, test coverage will be improved later.
What do you think of the idea of breaking down a huge PR into smaller PRs
and giving more meaningful commit messages?
app/src/main/java/ch/sdp/vibester/auth/FireBaseAuthenticator.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/ch/sdp/vibester/database/PersistanceSetter.kt
Outdated
Show resolved
Hide resolved
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 partial review, I will look at your pr again after the changes. Lets do several PRs in next sprints, please!
But thank you a lot for your changes. They are nice!!
app/src/main/java/ch/sdp/vibester/activity/AuthenticationActivity.kt
Outdated
Show resolved
Hide resolved
@@ -17,12 +17,16 @@ import ch.sdp.vibester.R | |||
import ch.sdp.vibester.api.LastfmMethod | |||
import ch.sdp.vibester.helper.TypingGameManager | |||
import org.hamcrest.CoreMatchers.not | |||
import org.junit.* |
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.
Good change!
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.
What causes such a drop in the tests coverage?
I gave it a second quick look, I have some questions. Next review I will approve, I promise!!!
app/src/androidTest/java/ch/sdp/vibester/activity/BuzzerScreenActivityTest.kt
Outdated
Show resolved
Hide resolved
app/src/androidTest/java/ch/sdp/vibester/activity/CreateProfileActivityTest.kt
Show resolved
Hide resolved
app/src/androidTest/java/ch/sdp/vibester/activity/GameEndingActivityTest.kt
Outdated
Show resolved
Hide resolved
app/src/androidTest/java/ch/sdp/vibester/activity/WelcomeActivityTest.kt
Outdated
Show resolved
Hide resolved
app/src/androidTest/java/ch/sdp/vibester/activity/WelcomeActivityTest.kt
Show resolved
Hide resolved
app/src/androidTest/java/ch/sdp/vibester/auth/FireBaseAuthenticatorTest.kt
Show resolved
Hide resolved
private var hasAlreadyAccessedInternetOnce: Boolean = false | ||
fun hasAccessedInternetOnce(ctx: Context):Boolean{ | ||
if (!hasAlreadyAccessedInternetOnce && getInternetStatus(ctx)) { | ||
|
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.
Extra unnecessary line
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.
Good job!
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.
Thank you for your work! The changes are nice and useful, you put a loooot of effort 💟 🎧
I hope we can separate big tasks in smaller tasks/prs next time. It is hard to check, and I believe it causes more errors/wrong decisions. go rest!
Code Climate has analyzed commit 8e559fc and detected 14 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 52.4% (80% is the threshold). This pull request will bring the total coverage in the repository to 85.4% (-3.6% change). View more on Code Climate. |
Refactor Authentication Process + Updates Score into Firebase
This is related to issue #161
This Pull Requests contains:
In addition the code is tested with a coverage of: [52.4]%
Notes for reviewers