diff --git a/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ActionManager.kt b/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ActionManager.kt index bdbf5705e9e7..952791a02ae3 100644 --- a/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ActionManager.kt +++ b/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ActionManager.kt @@ -28,6 +28,7 @@ interface ActionUtils { @Remote(value = "com.intellij.openapi.actionSystem.AnAction") interface AnAction { fun getShortcutSet(): ShortcutSet + fun getTemplateText(): String } @Remote("com.intellij.openapi.actionSystem.ShortcutSet") diff --git a/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/Notifications.kt b/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/Notifications.kt new file mode 100644 index 000000000000..ff90b238666d --- /dev/null +++ b/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/Notifications.kt @@ -0,0 +1,24 @@ +package com.intellij.driver.sdk + +import com.intellij.driver.client.Driver +import com.intellij.driver.client.Remote +import com.intellij.driver.model.OnDispatcher + +@Remote("com.intellij.notification.Notification") +interface Notification { + fun getTitle(): String + fun getContent(): String + fun getGroupId(): String + fun getActions(): List +} + +@Remote("com.intellij.notification.ActionCenter") +interface ActionCenter { + fun getNotifications(project: Project): List +} + +fun Driver.getNotifications(project: Project? = null): Collection { + return withContext(OnDispatcher.EDT) { + utility(ActionCenter::class).getNotifications(project ?: singleProject()) + } +} \ No newline at end of file diff --git a/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/Registry.kt b/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/Registry.kt new file mode 100644 index 000000000000..24e1a424dd04 --- /dev/null +++ b/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/Registry.kt @@ -0,0 +1,21 @@ +package com.intellij.driver.sdk + +import com.intellij.driver.client.Driver +import com.intellij.driver.client.Remote + +fun Driver.setRegistry(key: String, value: String) { + utility(Registry::class).get(key).setValue(value) +} + +@Remote("com.intellij.openapi.util.registry.Registry") +interface Registry { + fun `is`(key: String): Boolean + + fun get(key: String): RegistryValue +} + +@Remote("com.intellij.openapi.util.registry.RegistryValue") +interface RegistryValue { + fun setValue(value: String) + fun setSelectedOption(option: String) +} \ No newline at end of file diff --git a/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ui/utils.kt b/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ui/utils.kt index 7fa0e83ca26b..fa4ec976a66f 100644 --- a/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ui/utils.kt +++ b/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ui/utils.kt @@ -74,20 +74,6 @@ fun printableString(toPrint: String): String { return resultString } -fun Driver.setRegistry(key: String, value: String) { - utility(Registry::class).get(key).setValue(value) -} - -@Remote("com.intellij.openapi.util.registry.Registry") -interface Registry { - fun get(key: String): RegistryValue -} - -@Remote("com.intellij.openapi.util.registry.RegistryValue") -interface RegistryValue { - fun setValue(value: String) -} - @Remote("org.assertj.swing.driver.CellRendererReader") interface CellRendererReader