-
Notifications
You must be signed in to change notification settings - Fork 0
game setup modification offline part 1 #342
Conversation
…ester into maximezmt/offline
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. |
fun returnFromGenreToGame(){ | ||
fun internetButtonClick() { | ||
InternetState.disableForceOnline() | ||
onView(withId(R.id.game_setup_has_internet)).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.
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 | ||
|
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.
Again maybe add some empty lines for readability
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.
LGTM, just added some comments but you can fix them in another PR
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.
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) { |
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.
if(isConncted) { | |
if (isConncted) { |
@@ -59,7 +60,19 @@ class GameSetupFragmentTest { | |||
} | |||
|
|||
@Test | |||
fun returnFromGenreToGame(){ | |||
fun internetButtonClick() { | |||
InternetState.disableForceOnline() |
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.
for the purpose of unit test, maybe separate online and offline
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.
This one is to check the transition, this is why it is like that
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](https://user-images.githubusercontent.com/61186830/170218092-e75d18e3-6f76-4c92-ab6f-7a913b36916f.jpg)
![photo_2022-05-25_10-30-50](https://user-images.githubusercontent.com/61186830/170218096-14b092cf-8e14-4ae2-bbaf-be40d1ad8bf9.jpg)