Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Jwen/lyric save score #258

Merged
merged 12 commits into from
May 7, 2022
Merged

Jwen/lyric save score #258

merged 12 commits into from
May 7, 2022

Conversation

jiabaow
Copy link
Collaborator

@jiabaow jiabaow commented May 7, 2022

  • save the score at the end of the lyric game
  • refactor the common method in lyric game and typing game

coverage is low due to firebase

@jiabaow jiabaow self-assigned this May 7, 2022
@jiabaow jiabaow marked this pull request as ready for review May 7, 2022 09:32
@codeclimate
Copy link

codeclimate bot commented May 7, 2022

Code Climate has analyzed commit be7c980 and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1

The test coverage on the diff in this pull request is 66.6% (80% is the threshold).

This pull request will bring the total coverage in the repository to 82.0% (-0.2% change).

View more on Code Climate.

Copy link
Owner

@MaximeZmt MaximeZmt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great modifications and mocking (hourraaaaa !!! will improve ci stability) 👍
I left two comments on some weird documentations that I found in the codebase. Could be great if you can correct it 😀

super.setScores(gameManager)
}
}

/** helper functions to test private functions */
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/** helper functions to test private functions */
/* helper functions to test private functions */

It is a bit weird how the comment is done for the moment.
Either do a comment that describe that below functions are helper
or do a javadoc for each.
But a javadoc that does multiple function at a time does not seems following the conventions.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't write this comment nor this part, I just added one * more so it shows green...
I will leave this to the people who do refactor to change.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same, will do change myself

}
}

/**
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/**
/*

same as above, Javadoc is for a single function

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe adding a javadoc for each could be great as their part of public interface, even if they are only for testing purpose.

Copy link
Collaborator Author

@jiabaow jiabaow May 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a nice comment, but not the focus of my PR (as I didn't use this part of the code). I think leaving the task to the people who do refactoring will be better.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay will do myself the change so. We will forget it otherwise

@MaximeZmt MaximeZmt self-requested a review May 7, 2022 14:35
Copy link
Owner

@MaximeZmt MaximeZmt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oupsi don't want to approve so fast 😂😂 I've missclicked

@jiabaow jiabaow requested a review from MaximeZmt May 7, 2022 14:48
@@ -285,6 +313,7 @@ class LyricsBelongGameActivityTest {
currentArtist = activity.getArtistName()
currentSong = activity.getSongName()
}

onView(withId(R.id.lyricMatchButton)).check(matches(not(isDisplayed())))
assertEquals(artistName, currentArtist)
assertEquals("Monday", currentSong)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Whole file) Great job on adding mocks and removing Thread.sleep instances 👍

Copy link
Collaborator

@zwierski zwierski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good to me. Maxime's comments on the Javadoc seem solved now as well.

@zwierski zwierski merged commit 81dc4f9 into main May 7, 2022
@zwierski zwierski deleted the jwen/lyric-save-score branch May 7, 2022 15:31
@jiabaow jiabaow linked an issue May 8, 2022 that may be closed by this pull request
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

save score in the firebase after the lyric game ended(#137)
3 participants