mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
[remote-driver] add SearchEveryWhereUiTest#testShortcutAdd
GitOrigin-RevId: d69498b3b0cd6382074942dfc5de5f89c73c707f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
71a0700960
commit
ad8eb7b98f
@@ -46,6 +46,10 @@ class SearchEverywherePopupUI(data: ComponentData) : PopupUiComponent(data) {
|
||||
invokeActionWithShortcut("[shift pressed TAB]")
|
||||
}
|
||||
|
||||
fun invokeAssignShortcutAction() {
|
||||
invokeActionWithShortcut("[alt pressed ENTER]")
|
||||
}
|
||||
|
||||
fun getSelectedTab(): SearchEverywhereTab = SearchEverywhereTab.entries.single { it.id == searchEverywhereUi.getSelectedTabID() }
|
||||
|
||||
fun searchAndChooseFirst(text: String, exactMatch: Boolean = true) {
|
||||
@@ -64,6 +68,10 @@ class SearchEverywherePopupUI(data: ComponentData) : PopupUiComponent(data) {
|
||||
waitFor("Popup is closed") { notPresent() }
|
||||
}
|
||||
|
||||
fun printActions() {
|
||||
println(driver.utility(ActionUtils::class).getActions(searchEverywhereUi.component).map { it.getShortcutSet().getShortcuts().contentToString() })
|
||||
}
|
||||
|
||||
private fun invokeActionWithShortcut(shortcut: String, chooser: (List<AnAction>) -> AnAction? = { it.singleOrNull() }) {
|
||||
val action = driver.utility(ActionUtils::class).getActions(searchEverywhereUi.component).filter {
|
||||
it.getShortcutSet().getShortcuts().singleOrNull()?.toString() == shortcut
|
||||
|
||||
Reference in New Issue
Block a user