File tree Expand file tree Collapse file tree
AnkiDroid/src/test/java/com/ichi2/anki Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -872,9 +872,10 @@ class CardBrowserTest : RobolectricTest() {
872872
873873 /* * PR #14859 */
874874 @Test
875- fun checkDisplayOrderAfterTogglingCardsToNotes () {
876- browserWithNoNewCards. apply {
875+ fun checkDisplayOrderAfterTogglingCardsToNotes () =
876+ withBrowser {
877877 viewModel.changeCardOrder(SortType .EASE ) // order no. 7 corresponds to "cardEase"
878+
878879 viewModel.changeCardOrder(SortType .EASE ) // reverse the list
879880
880881 viewModel.setCardsOrNotes(NOTES )
@@ -891,7 +892,6 @@ class CardBrowserTest : RobolectricTest() {
891892 equalTo(true ),
892893 )
893894 }
894- }
895895
896896 data class CheckedCardResult (
897897 val row : BrowserRow ,
@@ -1681,13 +1681,13 @@ val CardBrowser.columnHeadings
16811681 get() =
16821682 columnHeadingViews.map { it.text.toString() }
16831683
1684- fun CardBrowser.searchCards (search : String? = null) {
1684+ suspend fun CardBrowser.searchCards (search : String? = null) {
16851685 if (search != null ) {
16861686 viewModel.launchSearchForCards(search)
16871687 } else {
16881688 viewModel.launchSearchForCards()
16891689 }
1690- runBlocking { viewModel.searchJob?.join() }
1690+ viewModel.searchJob?.join()
16911691}
16921692
16931693fun CardBrowser.showFindAndReplaceDialog () = cardBrowserFragment.showFindAndReplaceDialog()
You can’t perform that action at this time.
0 commit comments