Skip to content

Commit 86ef746

Browse files
david-allisonBrayanDSO
authored andcommitted
test: BrowserOptionsDialog: smoke test
1 parent 572ac6b commit 86ef746

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
* Copyright (c) 2025 David Allison <[email protected]>
3+
*
4+
* This program is free software; you can redistribute it and/or modify it under
5+
* the terms of the GNU General Public License as published by the Free Software
6+
* Foundation; either version 3 of the License, or (at your option) any later
7+
* version.
8+
*
9+
* This program is distributed in the hope that it will be useful, but WITHOUT ANY
10+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11+
* PARTICULAR PURPOSE. See the GNU General Public License for more details.
12+
*
13+
* You should have received a copy of the GNU General Public License along with
14+
* this program. If not, see <http://www.gnu.org/licenses/>.
15+
*/
16+
17+
package com.ichi2.anki.dialogs
18+
19+
import androidx.test.ext.junit.rules.ActivityScenarioRule
20+
import androidx.test.ext.junit.runners.AndroidJUnit4
21+
import com.ichi2.anki.CardBrowser
22+
import com.ichi2.anki.model.CardsOrNotes
23+
import com.ichi2.anki.tests.InstrumentedTest
24+
import org.junit.Rule
25+
import org.junit.Test
26+
import org.junit.runner.RunWith
27+
28+
/** Tests [BrowserOptionsDialog] */
29+
@RunWith(AndroidJUnit4::class)
30+
class BrowserOptionsDialogTest : InstrumentedTest() {
31+
@get:Rule
32+
val activityRule = ActivityScenarioRule(CardBrowser::class.java)
33+
34+
@Test
35+
fun dialogLoads() {
36+
activityRule.scenario.onActivity { activity ->
37+
BrowserOptionsDialog
38+
.newInstance(
39+
CardsOrNotes.CARDS,
40+
isTruncated = true,
41+
).show(activity.supportFragmentManager, "BrowserOptionsDialog")
42+
}
43+
}
44+
}

0 commit comments

Comments
 (0)