[registry] IJPL-162599 Integration test for cloud registry

(cherry picked from commit 2e31397589c70cbe852a645f949735fd48243a03)

# Conflicts:
#	community/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ui/utils.kt
#	tests/intellij.ide.starter.extended.allure/src/com/intellij/ide/starter/extended/allure/Annotations.kt
#	tests/intellij.llmTests/src/com/intellij/ml/llm/tests/BaseMLTest.kt
#	tests/remote-driver-tests/intellij.driver.tests.iml


(cherry picked from commit 07b0accfe0a7c713d910b52a5015ad7474e985a9)

IJ-MR-154004

GitOrigin-RevId: fde46890f8810e4e9129c8d89ddb61a79b544002
This commit is contained in:
Yuriy Artamonov
2024-11-21 15:14:55 +01:00
committed by intellij-monorepo-bot
parent 73555cf872
commit f74eae5f0a
4 changed files with 46 additions and 14 deletions

View File

@@ -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")

View File

@@ -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<AnAction>
}
@Remote("com.intellij.notification.ActionCenter")
interface ActionCenter {
fun getNotifications(project: Project): List<Notification>
}
fun Driver.getNotifications(project: Project? = null): Collection<Notification> {
return withContext(OnDispatcher.EDT) {
utility(ActionCenter::class).getNotifications(project ?: singleProject())
}
}

View File

@@ -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)
}

View File

@@ -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