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,15 +872,13 @@ class CardBrowserTest : RobolectricTest() {
872872
873873 /* * PR #14859 */
874874 @Test
875- fun checkDisplayOrderAfterTogglingCardsToNotes () {
876- browserWithNoNewCards. apply {
877- viewModel.changeCardOrder(SortType .EASE ) // order no. 7 corresponds to "cardEase"
878- viewModel.changeCardOrder(SortType .EASE ) // reverse the list
875+ fun checkDisplayOrderAfterTogglingCardsToNotes () =
876+ withBrowser {
877+ viewModel.changeCardOrder(SortType .EASE )
878+ viewModel.changeCardOrder(SortType .EASE )
879879
880880 viewModel.setCardsOrNotes(NOTES )
881- runTest {
882- searchCards()
883- }
881+ searchCards()
884882
885883 assertThat(
886884 " Card Browser has the new noteSortType field" ,
@@ -893,7 +891,6 @@ class CardBrowserTest : RobolectricTest() {
893891 equalTo(true ),
894892 )
895893 }
896- }
897894
898895 data class CheckedCardResult (
899896 val row : BrowserRow ,
@@ -1015,8 +1012,7 @@ class CardBrowserTest : RobolectricTest() {
10151012 cardBrowser.viewModel.setCardsOrNotes(CARDS )
10161013
10171014 cardBrowser.searchCards()
1018-
1019-
1015+
10201016 advanceRobolectricLooper()
10211017 // check if we get both cards of each note
10221018 assertThat(cardBrowser.viewModel.rowCount, equalTo(6 ))
You can’t perform that action at this time.
0 commit comments