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

Commit

Permalink
update GameScreenActivityTest 2
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximeZmt committed Mar 17, 2022
1 parent 8ad4578 commit 1b4afbc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class GamescreenActivityTest {
*/
@Test
fun checkIntentOnEnding() {
onView(withId(R.id.scoresTable)).perform(click())
onView(withId(R.id.go_to_end)).perform(click())
intended(hasComponent(GameEndingScreen::class.java.name))
intended(hasExtra("playerName", "Arda"))
intended(hasExtra("nbIncorrectSong", 3))
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/res/layout/activity_gamescreen.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,15 @@

</TableLayout>

<Button
android:id="@+id/go_to_end"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="switchToEnding"
android:text="@string/go_to_end"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/scoresTable" />


</androidx.constraintlayout.widget.ConstraintLayout>

0 comments on commit 1b4afbc

Please sign in to comment.