mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 06:50:54 +07:00
[ui-test] Depending on whether we have display or not we either have header or not
GitOrigin-RevId: b5b545901ac71f64d874b8463c48e6ba4c1bca00
This commit is contained in:
committed by
intellij-monorepo-bot
parent
69005ec57a
commit
7ec4a45292
@@ -1,9 +1,23 @@
|
||||
package com.intellij.driver.sdk.ui.components
|
||||
|
||||
import com.intellij.driver.sdk.ui.Finder
|
||||
import com.intellij.openapi.util.SystemInfo
|
||||
|
||||
val Finder.mainToolbar: MainToolbarUI get() =
|
||||
x("//div[@class='MainToolbar']", MainToolbarUI::class.java)
|
||||
x("//div[@class='MainToolbar']", MainToolbarUI::class.java)
|
||||
|
||||
|
||||
/**
|
||||
* On Linux without DISPLAY, we run xvfb without window manager and in this case header is missing and we fallback to maintoolbar
|
||||
*/
|
||||
val Finder.toolbar: UiComponent
|
||||
get() = if (SystemInfo.isLinux && System.getenv("DISPLAY") == null) {
|
||||
mainToolbar
|
||||
}
|
||||
else {
|
||||
toolbarHeader
|
||||
}
|
||||
|
||||
|
||||
class MainToolbarUI(data: ComponentData) : UiComponent(data) {
|
||||
val vcsWidget: UiComponent get() = x { and(byClass("ToolbarComboButton"), contains(byVisibleText("Version"))) }
|
||||
|
||||
Reference in New Issue
Block a user