mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[ui-tests] Greenify
GitOrigin-RevId: c2ade3de9c05ffeb3fd4c5237600c69bd70ac860
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f6a42f1866
commit
d5c12ac5e3
@@ -3,6 +3,7 @@ package com.intellij.driver.sdk.ui
|
||||
import com.intellij.driver.model.TextData
|
||||
import com.intellij.driver.sdk.ui.components.UiComponent
|
||||
import com.intellij.openapi.diagnostic.logger
|
||||
import java.awt.Point
|
||||
|
||||
class UiText(private val component: UiComponent, private val textData: TextData) {
|
||||
companion object {
|
||||
@@ -11,9 +12,9 @@ class UiText(private val component: UiComponent, private val textData: TextData)
|
||||
fun List<UiText>.allText(separator: String = "") = joinToString(separator) { it.text }
|
||||
}
|
||||
|
||||
val text get() = textData.text
|
||||
val point get() = textData.point
|
||||
val bundleKey get() = textData.bundleKey
|
||||
val text get(): String = textData.text
|
||||
val point get(): Point = textData.point
|
||||
val bundleKey get(): String = textData.bundleKey
|
||||
|
||||
override fun toString(): String {
|
||||
return "UiText[$text]"
|
||||
|
||||
+1
-1
@@ -291,7 +291,7 @@ data class GutterState(
|
||||
class InlayHint(val offset: Int, val text: String)
|
||||
|
||||
fun List<InlayHint>.getHint(offset: Int): InlayHint {
|
||||
val foundHint = this.find { it.offset.equals(offset) }
|
||||
val foundHint = this.find { it.offset == offset }
|
||||
if (foundHint == null) {
|
||||
throw NoSuchElementException("cannot find hint with offset: $offset")
|
||||
}
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ open class JListUiComponent(data: ComponentData) : UiComponent(data) {
|
||||
fun doubleClickItem(itemText: String, fullMatch: Boolean = true) {
|
||||
findItemIndex(itemText, fullMatch)?.let { index ->
|
||||
val cellBounds = getCellBounds(index)
|
||||
doubleClick(Point(cellBounds.getCenterX().toInt(), cellBounds.getCenterY().toInt()))
|
||||
doubleClick(Point(cellBounds.centerX.toInt(), cellBounds.centerY.toInt()))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.intellij.driver.sdk.ui.remote
|
||||
|
||||
import com.intellij.driver.client.Remote
|
||||
import com.intellij.driver.model.RemoteMouseButton
|
||||
import java.awt.Color
|
||||
import java.awt.Point
|
||||
|
||||
@Remote("com.jetbrains.performancePlugin.remotedriver.robot.SmoothRobot", plugin = REMOTE_ROBOT_MODULE_ID)
|
||||
|
||||
@@ -58,7 +58,7 @@ interface SwingUtilities {
|
||||
fun computeDifference(rectA: Rectangle, rectB: Rectangle): Array<Rectangle>
|
||||
}
|
||||
|
||||
val Rectangle.center get() = Point(getCenterX().toInt(), getCenterY().toInt())
|
||||
val Rectangle.center: Point get() = Point(centerX.toInt(), centerY.toInt())
|
||||
|
||||
fun printableString(toPrint: String): String {
|
||||
val resultString = toPrint.let {
|
||||
|
||||
Reference in New Issue
Block a user