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

game setup modification offline part 1 #342

Merged
merged 15 commits into from
May 25, 2022
Merged

game setup modification offline part 1 #342

merged 15 commits into from
May 25, 2022

Conversation

MaximeZmt
Copy link
Owner

@MaximeZmt MaximeZmt commented May 23, 2022

Edit the game setup wether the user has internet or not.

Currently not connected to offline game but will come soon
photo_2022-05-25_10-30-49
photo_2022-05-25_10-30-50

@MaximeZmt MaximeZmt linked an issue May 23, 2022 that may be closed by this pull request
@MaximeZmt MaximeZmt self-assigned this May 23, 2022
@codeclimate
Copy link

codeclimate bot commented May 25, 2022

Code Climate has analyzed commit 96ea95c and detected 0 issues on this pull request.

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

This pull request will bring the total coverage in the repository to 85.1% (0.0% change).

View more on Code Climate.

@MaximeZmt MaximeZmt changed the title game setup modification offline game setup modification offline part 1 May 25, 2022
@MaximeZmt MaximeZmt marked this pull request as ready for review May 25, 2022 08:08
@jiabaow jiabaow self-requested a review May 25, 2022 08:10
fun returnFromGenreToGame(){
fun internetButtonClick() {
InternetState.disableForceOnline()
onView(withId(R.id.game_setup_has_internet)).perform(click())
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe you can add some empty lines between different logic in this test file

viewfrag!!.findViewById<LinearLayout>(R.id.horilayer_single).visibility = VISIBLE
viewfrag!!.findViewById<TextView>(R.id.singleplayer_game_txt).visibility = VISIBLE
viewfrag!!.findViewById<TextView>(R.id.multiplayer_game_txt).visibility = VISIBLE

Copy link
Collaborator

Choose a reason for hiding this comment

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

Again maybe add some empty lines for readability

Copy link
Collaborator

@laurislopata laurislopata left a comment

Choose a reason for hiding this comment

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

LGTM, just added some comments but you can fix them in another PR

Copy link
Collaborator

@jiabaow jiabaow left a comment

Choose a reason for hiding this comment

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

LGTM
Don't forget to put a screenshot in the description

btn.text = getString(R.string.GameSetup_internetSwitchOff)
} else {
val isConncted = InternetState.getInternetStatus(requireContext())
if(isConncted) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if(isConncted) {
if (isConncted) {

@@ -59,7 +60,19 @@ class GameSetupFragmentTest {
}

@Test
fun returnFromGenreToGame(){
fun internetButtonClick() {
InternetState.disableForceOnline()
Copy link
Collaborator

Choose a reason for hiding this comment

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

for the purpose of unit test, maybe separate online and offline

Copy link
Owner Author

Choose a reason for hiding this comment

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

This one is to check the transition, this is why it is like that

@MaximeZmt MaximeZmt merged commit 19e75ec into main May 25, 2022
@MaximeZmt MaximeZmt deleted the maximezmt/offline branch May 25, 2022 10:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Manage online and offline feature on the app (#322)
3 participants