|
1 | 1 | package com.italankin.fifteen; |
2 | 2 |
|
3 | | -import static androidx.test.espresso.Espresso.onView; |
4 | | -import static androidx.test.espresso.assertion.ViewAssertions.matches; |
5 | | -import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed; |
6 | | -import static androidx.test.espresso.matcher.ViewMatchers.withId; |
7 | | - |
8 | 3 | import android.content.SharedPreferences; |
9 | | - |
10 | 4 | import androidx.test.ext.junit.rules.ActivityScenarioRule; |
11 | 5 | import androidx.test.ext.junit.runners.AndroidJUnit4; |
12 | 6 | import androidx.test.filters.LargeTest; |
13 | | - |
14 | 7 | import com.italankin.fifteen.game.ClassicGame; |
15 | 8 | import com.italankin.fifteen.game.Game; |
| 9 | +import com.italankin.fifteen.util.CreateNewGameAction; |
16 | 10 | import com.italankin.fifteen.util.HoverSolveAction; |
17 | | - |
18 | 11 | import org.junit.Assert; |
19 | 12 | import org.junit.Before; |
20 | 13 | import org.junit.Rule; |
|
24 | 17 | import java.util.Arrays; |
25 | 18 | import java.util.List; |
26 | 19 |
|
| 20 | +import static androidx.test.espresso.Espresso.onView; |
| 21 | +import static androidx.test.espresso.assertion.ViewAssertions.matches; |
| 22 | +import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed; |
| 23 | +import static androidx.test.espresso.matcher.ViewMatchers.withId; |
| 24 | + |
27 | 25 | @RunWith(AndroidJUnit4.class) |
28 | 26 | @LargeTest |
29 | 27 | public class HoverTest { |
@@ -56,6 +54,9 @@ public void test() { |
56 | 54 | 9, 13, 2, 10, 1, 5, 11, 7, 3, 1, |
57 | 55 | 5, 2, 10, 9, 13, 14, 15, 11, 7, 6, |
58 | 56 | 4, 7, 6, 3, 2, 6, 7, 8, 12); |
| 57 | + |
| 58 | + onView(withId(R.id.game_view)).perform(new CreateNewGameAction()); |
| 59 | + |
59 | 60 | Game game = GameState.get().game; |
60 | 61 |
|
61 | 62 | onView(withId(R.id.game_view)).perform(new HoverSolveAction(game, solution)); |
|
0 commit comments