mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-02-26 14:46:00 +01:00
Add UI test for multicaret enter in select mode
This commit is contained in:
parent
db6786414a
commit
72f286d9c6
@ -95,6 +95,7 @@ class UiTests {
|
||||
`simple enter in insert mode`(editor)
|
||||
testMilticaretEnter(editor)
|
||||
`simple enter in select mode`(editor)
|
||||
testMilticaretEnterInSelectMode(editor)
|
||||
reenableIdeaVim(editor)
|
||||
|
||||
createFile("MyTest.java", this@uiTest)
|
||||
@ -700,4 +701,46 @@ class UiTests {
|
||||
editor.injectText(testTextForEditor)
|
||||
vimExit()
|
||||
}
|
||||
|
||||
// For VIM-3186
|
||||
private fun ContainerFixture.testMilticaretEnterInSelectMode(editor: Editor) {
|
||||
println("Run testMilticaretEnter...")
|
||||
|
||||
keyboard {
|
||||
pressing(KeyEvent.VK_ALT) {
|
||||
pressing(KeyEvent.VK_SHIFT) {
|
||||
findText("One").click()
|
||||
findText("Three").click()
|
||||
findText("Five").click()
|
||||
}
|
||||
}
|
||||
|
||||
enterText("$")
|
||||
enterText("v")
|
||||
pressing(KeyEvent.VK_CONTROL) { enterText("g") }
|
||||
enter()
|
||||
}
|
||||
|
||||
assertEquals(3, editor.caretCount)
|
||||
|
||||
assertEquals(
|
||||
"""
|
||||
|One Tw
|
||||
|
|
||||
|Three Fou
|
||||
|
|
||||
|Fiv
|
||||
|
|
||||
""".trimMargin(), editor.text
|
||||
)
|
||||
|
||||
// Reset state
|
||||
keyboard {
|
||||
escape()
|
||||
escape()
|
||||
}
|
||||
assertEquals(1, editor.caretCount)
|
||||
editor.injectText(testTextForEditor)
|
||||
vimExit()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user