Skip to content

Commit

Permalink
fixup! Ensure that activities are fully deleted between tests
Browse files Browse the repository at this point in the history
  • Loading branch information
amberin committed Mar 17, 2024
1 parent 432de1e commit 8b93169
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,14 @@
import com.orgzly.android.ui.main.MainActivity;
import com.orgzly.org.datetime.OrgDateTime;

import org.junit.After;
import org.junit.Ignore;
import org.junit.Test;

import java.io.IOException;

public class QueryFragmentTest extends OrgzlyTest {
private ActivityScenario<MainActivity> scenario;
private void defaultSetUp() {
testUtils.setupBook("book-one",
"First book used for testing\n" +
Expand Down Expand Up @@ -100,7 +102,14 @@ private void defaultSetUp() {
"** Note #28.\n" +
"");

ActivityScenario.launch(MainActivity.class);
scenario = ActivityScenario.launch(MainActivity.class);
}

@After
@Override
public void tearDown() throws Exception {
super.tearDown();
scenario.close();
}

@Test
Expand Down

0 comments on commit 8b93169

Please sign in to comment.