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

Kamila/refactor_game_choice_logic #146

Merged
merged 86 commits into from
Apr 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
f869f6c
remove MainActivity.kt
kamilababayeva Apr 1, 2022
b0dedd7
remove MainActivityTest.kt
kamilababayeva Apr 1, 2022
e903d66
AndroidManifest.xml: make WelcomeActivity as a launch activity
kamilababayeva Apr 1, 2022
a1ddbee
WelcomeActivity.kt: remove unnecessary buttons
kamilababayeva Apr 1, 2022
5bb6417
WelcomeActivityTest.kt: remove unnecessary tests
kamilababayeva Apr 1, 2022
5b657fe
BuzzerScreenActivityTest: rename file form GamescreenActivityTest
kamilababayeva Apr 2, 2022
dccc78e
BuzzerSetupActivityTest: move test for buzzer from GameSetupActivitytest
kamilababayeva Apr 2, 2022
4d7393c
GamescreenActivity rename to BuzzerScreenActivity
kamilababayeva Apr 2, 2022
e217b8e
LastfmUri: change val to var
kamilababayeva Apr 2, 2022
601ae5f
Delete GenreTemporary.kt
kamilababayeva Apr 2, 2022
a6072c5
delete activity_genre_remporary.xml
kamilababayeva Apr 2, 2022
0d9bc85
activity_buzzer_setup.xml: move buzzer layout form game_setup_screen
kamilababayeva Apr 2, 2022
8f24587
AndroidManifest.xml: add new activity BuzzerScreenActivity
kamilababayeva Apr 2, 2022
da0cd04
Delete GenreTemporaryTest
kamilababayeva Apr 2, 2022
d17b132
rename gamescreen to buzzer_screen
kamilababayeva Apr 2, 2022
a492bd8
activity_game_setup_screen.xml: move genre layout
kamilababayeva Apr 2, 2022
8fe93b2
BuzzerSetupActivity: move buzzer activity to game setup activity
kamilababayeva Apr 2, 2022
ee1aceb
Rename GamescreenActivityTest to BuzzerScreenActivityTest
kamilababayeva Apr 2, 2022
827ff65
GameSetupActivity: connect genre choose and solo typing game
kamilababayeva Apr 2, 2022
c05f5bd
GameSetupActivityTest: modify tests
kamilababayeva Apr 2, 2022
7fd19b2
GameSetupActivity: fixx difficulty setup
kamilababayeva Apr 2, 2022
a081aa4
GameSetupActivityTest.kt: fix the tests
kamilababayeva Apr 2, 2022
9d82a21
Delete activity_music_temporary.xml
kamilababayeva Apr 2, 2022
f4e3f57
rounded_button.xml: set shape for several buttons
kamilababayeva Apr 2, 2022
9e275c5
activity_genre_setup_screen.xml: set appropriate style to buttons
kamilababayeva Apr 2, 2022
9cb97c4
BuzzerSetupActivityTest: dix the test
kamilababayeva Apr 2, 2022
fdb5fba
GameSetupActivity: add switch game to avoid duplicates
kamilababayeva Apr 2, 2022
ca12f54
GameSetupActivity: set uri only in the end of when
kamilababayeva Apr 2, 2022
90b9a8a
change function name from play to chooseGenre
kamilababayeva Apr 2, 2022
e051040
activity_game_setup.xml: add a function to choose a game
kamilababayeva Apr 2, 2022
204db76
BuzzerSetupActivity.kt: modify the spinner initialization
kamilababayeva Apr 2, 2022
1166e4a
GameSetupActivty: remove duplicates
kamilababayeva Apr 2, 2022
80076dd
GameSetupActivity: change spinner init
kamilababayeva Apr 2, 2022
d599161
remove deleted file
kamilababayeva Apr 2, 2022
1a28edb
activity_welcome_screen: remove switchToListen
kamilababayeva Apr 2, 2022
ded724b
AndroidManifest.xml: remove Genre
kamilababayeva Apr 2, 2022
1425282
BuzzerScreenActivity: set mock array
kamilababayeva Apr 2, 2022
d33d989
BuzzerScreenActivityTest: fix switchToEnding
kamilababayeva Apr 2, 2022
f791215
GameSetupActivity: fix duplication
kamilababayeva Apr 2, 2022
7684451
BuzzerSetupActivity: try fixing test
kamilababayeva Apr 2, 2022
90464ab
comment the tests for check
kamilababayeva Apr 2, 2022
4b9e15f
TypingGameActivityTest: temporary remove the test
kamilababayeva Apr 3, 2022
8a7ba7b
Merge branch 'jwen/single-player-lyrics-game' into kamila/refactor_ga…
kamilababayeva Apr 3, 2022
6241f00
remove unnecessary test
kamilababayeva Apr 3, 2022
3ce8288
set new game local lyrics
kamilababayeva Apr 3, 2022
2ee1770
Remove unnecessary tests
kamilababayeva Apr 3, 2022
1dfc0c1
activity_buzzer_setup.xml: fixing the buzzer
kamilababayeva Apr 3, 2022
e176235
GameSetupActivity: set different gameManagers for games
kamilababayeva Apr 3, 2022
3934363
GameSetupActivityTest: add tests for genre button clicks
kamilababayeva Apr 3, 2022
9fac985
delete activity_main.xml
kamilababayeva Apr 3, 2022
a7a680b
BuzzerScreenActivity: fixing the duplication
kamilababayeva Apr 3, 2022
4fcbbe7
BuzzerScreenActivity: fixing the types of arrays
kamilababayeva Apr 3, 2022
a554ca5
merge main branch
kamilababayeva Apr 3, 2022
7dd7316
default test run
kamilababayeva Apr 3, 2022
eb5d0d9
remove activity
kamilababayeva Apr 3, 2022
934ea02
remove unnecessary library
kamilababayeva Apr 3, 2022
bea812f
actiity_buzzer_setup: fix some parameters
kamilababayeva Apr 3, 2022
e87516e
LyricsBelongGameActivity: fix the time
kamilababayeva Apr 3, 2022
6078567
restart CI
kamilababayeva Apr 3, 2022
a50f7d9
GameSetupActivity: remove unnecessary library
kamilababayeva Apr 3, 2022
745f015
LyricsBelongGameActivity: remove the tests
kamilababayeva Apr 3, 2022
934dfca
Delete helper to load img with glide for the profile
kamilababayeva Apr 3, 2022
86934e3
BuzzerSetupActivity: remove breaking test
kamilababayeva Apr 3, 2022
805558a
TypingGameActivity: put back the test
kamilababayeva Apr 3, 2022
726d78e
ActivityTests: fix the imports and set @RunWith(AndroidJUnit4::class)
kamilababayeva Apr 3, 2022
e694f68
activity_buzzer_setup: set the button constraints
kamilababayeva Apr 3, 2022
0cd4c7c
BuzzerSetupActivityTest.kt: put the test back
kamilababayeva Apr 3, 2022
c8e7ddc
BuzzerSetupActivityTest: put all tests back
kamilababayeva Apr 3, 2022
4745f4d
GameSetupActivity: fix the space
kamilababayeva Apr 3, 2022
d7ce57c
add comments to classes
kamilababayeva Apr 3, 2022
57c0f3a
GameSetupActivityTest: add extra check
kamilababayeva Apr 3, 2022
b3c15ad
Update app/src/main/java/ch/sdp/vibester/activity/BuzzerSetupActivity.kt
kamilababayeva Apr 4, 2022
2d80d1f
Update app/src/main/java/ch/sdp/vibester/activity/GameSetupActivity.kt
kamilababayeva Apr 4, 2022
a09bda0
GameManager: dix the return of setNextSong()
kamilababayeva Apr 4, 2022
b149d83
TypingGameActivityTest.kt: fix the space/comments
kamilababayeva Apr 4, 2022
72a35a3
GameManagerTest.kt: add wrong test to the setManager
kamilababayeva Apr 4, 2022
4f427f8
Buzzer: change type of points from array to arraylist
kamilababayeva Apr 4, 2022
de40a45
GameManagerTest: check wrong fetched song
kamilababayeva Apr 4, 2022
87265f2
GameSetupActivityTest: check the diffciulties for setMax in GameActivity
kamilababayeva Apr 4, 2022
7024aa2
BuzzerSetupActivity: check the return of test value
kamilababayeva Apr 4, 2022
1bd7bd4
LyricBelongToGameActivity: add fixme documentation
kamilababayeva Apr 4, 2022
1b365a3
strings.xml: add button for lyrics game
kamilababayeva Apr 4, 2022
568bf25
activity_game_setup_screen.xml: add button for local lyrics
kamilababayeva Apr 4, 2022
2c43b31
GameSetupActivity: add gameManager for lyricsGame
kamilababayeva Apr 4, 2022
f54bd21
GameSetupActivity: add comment
kamilababayeva Apr 4, 2022
103db5d
GameSetupActivityTest: add test for LyricsGame
kamilababayeva Apr 4, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
package ch.sdp.vibester

import junit.framework.Assert.assertTrue
import org.hamcrest.CoreMatchers.equalTo
import org.hamcrest.MatcherAssert.assertThat
import org.junit.Test

public class BuzzerScoreUpdaterTest {

@Test
fun constructorTestWithSameSizedArrays() {
val idArray = arrayOf(R.id.buzzer_0, R.id.buzzer_1, R.id.buzzer_2, R.id.buzzer_3)
val idArray = arrayListOf(R.id.buzzer_0, R.id.buzzer_1, R.id.buzzer_2, R.id.buzzer_3)
val scoreArray = arrayOf(0, 0, 0, 0)
val testUpdater = BuzzerScoreUpdater(idArray, scoreArray)
for (key in idArray) {
Expand All @@ -22,7 +20,7 @@ public class BuzzerScoreUpdaterTest {

@Test
fun arrayUpdateTest() {
val idArray = arrayOf(R.id.buzzer_0, R.id.buzzer_1, R.id.buzzer_2, R.id.buzzer_3)
val idArray = arrayListOf(R.id.buzzer_0, R.id.buzzer_1, R.id.buzzer_2, R.id.buzzer_3)
val scoreArray = arrayOf(0, 0, 0, 0)
val testUpdater = BuzzerScoreUpdater(idArray, scoreArray)
for (id in idArray) {
Expand All @@ -33,7 +31,7 @@ public class BuzzerScoreUpdaterTest {

@Test
fun arrayUpdateWithWrongIdReturns() {
val idArray = arrayOf(R.id.buzzer_0, R.id.buzzer_1, R.id.buzzer_2, R.id.buzzer_3)
val idArray = arrayListOf(R.id.buzzer_0, R.id.buzzer_1, R.id.buzzer_2, R.id.buzzer_3)
val scoreArray = arrayOf(0, 0, 0, 0)
val testUpdater = BuzzerScoreUpdater(idArray, scoreArray)
testUpdater.updateScoresArray(-1)
Expand Down
44 changes: 0 additions & 44 deletions app/src/androidTest/java/ch/sdp/vibester/GenreTemporaryTest.kt

This file was deleted.

78 changes: 0 additions & 78 deletions app/src/androidTest/java/ch/sdp/vibester/GenreToLyricsTest.kt

This file was deleted.

77 changes: 0 additions & 77 deletions app/src/androidTest/java/ch/sdp/vibester/GenreToTypingTest.kt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ import org.junit.Test
import org.junit.runner.RunWith

@RunWith(AndroidJUnit4::class)

class GamescreenActivityTest {
class BuzzerScreenActivityTest {

@get:Rule
val testRule = ActivityScenarioRule(
GamescreenActivity::class.java
BuzzerScreenActivity::class.java
)

@Before
Expand Down Expand Up @@ -77,30 +76,13 @@ class GamescreenActivityTest {
*/
@Test
fun checkIntentOnEnding() {
val incArray: ArrayList<String> = arrayListOf()
incArray.addAll(arrayOf("One", "Two", "Three"))

val statNames: ArrayList<String> = arrayListOf()
statNames.addAll(
arrayOf(
"Hello there",
"Second Stat",
"Third Stat",
"Fourth Stat",
"Fifth Stat"
)
)

val statVal: ArrayList<String> = arrayListOf()
statVal.addAll(
arrayOf(
"General Kenobi",
"----- *2 -----",
"----- *3 -----",
"----- *4 -----",
"----- *5 -----"
)
)
val mockArray = arrayListOf<String>("One", "Two", "Three", "Four", "Five")

val incArray: ArrayList<String> = mockArray

val statNames: ArrayList<String> = mockArray

val statVal: ArrayList<String> = mockArray
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good change, makes more sense to have all the tests values in variables.


onView(withId(R.id.go_to_end)).perform(click())
intended(hasComponent(GameEndingActivity::class.java.name))
Expand Down
Loading