Skip to content

Commit

Permalink
Fix test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedRejeb committed Feb 17, 2025
1 parent 621f5d6 commit 4d22b80
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1872,7 +1872,7 @@ public class RichTextState internal constructor(

// Check if it's a list and handle level appropriately
if (
minRemoveIndex == maxRemoveIndex &&
maxRemoveIndex - minRemoveIndex == 1 &&
minParagraphOldType is ConfigurableListLevel &&
minParagraphOldType.level > 1
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import androidx.compose.ui.test.ExperimentalTestApi
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.runDesktopComposeUiTest
import androidx.compose.ui.text.TextRange
import com.mohamedrejeb.richeditor.annotation.ExperimentalRichTextApi
import com.mohamedrejeb.richeditor.paragraph.RichParagraph
import com.mohamedrejeb.richeditor.paragraph.type.OrderedList
import com.mohamedrejeb.richeditor.ui.BasicRichTextEditor
Expand All @@ -20,7 +21,9 @@ import org.junit.Test
import kotlin.test.assertEquals
import kotlin.test.assertFalse

@OptIn(ExperimentalTestApi::class, ExperimentalComposeUiApi::class, InternalComposeUiApi::class)
@OptIn(ExperimentalTestApi::class, ExperimentalComposeUiApi::class, InternalComposeUiApi::class,
ExperimentalRichTextApi::class
)
class RichTextStateKeyEventTest {
@get:Rule
val rule = createComposeRule()
Expand Down

0 comments on commit 4d22b80

Please sign in to comment.