Skip to content

Commit

Permalink
Fix activity launch in SettingsFragmentTest
Browse files Browse the repository at this point in the history
  • Loading branch information
nevenz committed Aug 21, 2022
1 parent 209cee4 commit c3ad698
Showing 1 changed file with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
package com.orgzly.android.espresso;

import androidx.test.ext.junit.rules.ActivityScenarioRule;

import com.orgzly.R;
import com.orgzly.android.OrgzlyTest;
import com.orgzly.android.prefs.AppPreferences;
import com.orgzly.android.ui.main.MainActivity;

import org.junit.Rule;
import org.junit.Test;

import static androidx.test.espresso.Espresso.onData;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.Espresso.pressBack;
Expand All @@ -28,9 +18,23 @@
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.hasToString;

import androidx.test.core.app.ActivityScenario;

import com.orgzly.R;
import com.orgzly.android.OrgzlyTest;
import com.orgzly.android.prefs.AppPreferences;
import com.orgzly.android.ui.main.MainActivity;

import org.junit.Before;
import org.junit.Test;

public class SettingsFragmentTest extends OrgzlyTest {
@Rule
public ActivityScenarioRule<MainActivity> rule = new ActivityScenarioRule<>(MainActivity.class);
@Before
public void setUp() throws Exception {
super.setUp();

ActivityScenario.launch(MainActivity.class);
}

@Test
public void testImportingGettingStartedFromGettingStartedNotebook() {
Expand Down

0 comments on commit c3ad698

Please sign in to comment.