Skip to content

Commit 92454c2

Browse files
brettchabotcopybara-androidxtest
authored andcommitted
Replace deprecated API use in SwipeActionIntegrationTest
PiperOrigin-RevId: 840867315
1 parent 81cf3cb commit 92454c2

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

espresso/core/javatests/androidx/test/espresso/action/BUILD

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,6 @@ axt_android_library_test(
327327
"//espresso/intents/java/androidx/test/espresso/intent:intents",
328328
"//espresso/intents/java/androidx/test/espresso/intent/matcher",
329329
"//ext/junit",
330-
"//runner/android_junit_runner",
331-
"//runner/rules",
332330
"//testapps/ui_testapp/java/androidx/test/ui/app:lib_exported",
333331
"//testapps/ui_testapp/javatests/androidx/test/ui/app:test_resources",
334332
"@maven//:junit_junit",

espresso/core/javatests/androidx/test/espresso/action/SwipeActionIntegrationTest.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,19 @@
2929
import static org.hamcrest.Matchers.allOf;
3030

3131
import androidx.test.espresso.ViewAction;
32-
import androidx.test.filters.LargeTest;
33-
import androidx.test.rule.ActivityTestRule;
34-
import androidx.test.runner.AndroidJUnit4;
32+
import androidx.test.ext.junit.rules.ActivityScenarioRule;
33+
import androidx.test.ext.junit.runners.AndroidJUnit4;
3534
import androidx.test.ui.app.R;
3635
import androidx.test.ui.app.SwipeActivity;
3736
import org.junit.Rule;
3837
import org.junit.Test;
3938
import org.junit.runner.RunWith;
4039

4140
/** Integration tests for swiping actions. */
42-
@LargeTest
4341
@RunWith(AndroidJUnit4.class)
4442
public class SwipeActionIntegrationTest {
45-
@Rule public ActivityTestRule<SwipeActivity> rule = new ActivityTestRule<>(SwipeActivity.class);
43+
@Rule
44+
public ActivityScenarioRule<SwipeActivity> rule = new ActivityScenarioRule<>(SwipeActivity.class);
4645

4746
/** Tests that a small view can be swiped in both directions. */
4847
@Test

0 commit comments

Comments
 (0)