Skip to content

Commit

Permalink
Revert "investigating global linux menu issue"
Browse files Browse the repository at this point in the history
  • Loading branch information
nizienko committed Nov 7, 2023
1 parent 829db0d commit ff1d138
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 21 deletions.
3 changes: 0 additions & 3 deletions ui-test-example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ runIdeForUiTests {
systemProperty "apple.laf.useScreenMenuBar", "false"
systemProperty "idea.trust.all.projects", "true"
systemProperty "ide.show.tips.on.startup.default.value", "false"
// systemProperty "ide.experimental.ui", "true"
systemProperty "linux.native.menu.force.disable", "true"
systemProperty "linux.native.menu", "false"
// systemProperty "eap.require.license", "true"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ void createCommandLineProject(final RemoteRobot remoteRobot) {
sharedSteps.closeTipOfTheDay();

final IdeaFrame idea = remoteRobot.find(IdeaFrame.class, ofSeconds(10));
idea.runJs("""
const menuBar = component.getJMenuBar()
menuBar.setVisible(true)
""");
waitFor(ofMinutes(5), () -> !idea.isDumbMode());

step("Create Java file", () -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,13 @@ import com.intellij.remoterobot.RemoteRobot
import com.intellij.remoterobot.data.RemoteComponent
import com.intellij.remoterobot.fixtures.*
import com.intellij.remoterobot.search.locators.byXpath
import com.intellij.remoterobot.steps.CommonSteps
import com.intellij.remoterobot.stepsProcessing.step
import com.intellij.remoterobot.utils.component
import com.intellij.remoterobot.utils.waitFor
import java.time.Duration

fun RemoteRobot.idea(function: IdeaFrame.() -> Unit) {
find<IdeaFrame>(timeout = Duration.ofSeconds(10))
.apply {
step("Enable menu") {
runJs("""
const menuBar = component.getJMenuBar()
menuBar.setVisible(true)
""")
}
}
.apply(function)
find<IdeaFrame>(timeout = Duration.ofSeconds(10)).apply(function)
}

@FixtureName("Idea frame")
Expand All @@ -37,9 +28,6 @@ class IdeaFrame(remoteRobot: RemoteRobot, remoteComponent: RemoteComponent) :

val menuBar: JMenuBarFixture
get() = step("Menu...") {
if (remoteRobot.findAll(JMenuBarFixture::class.java, JMenuBarFixture.byType()).isEmpty()) {
CommonSteps(remoteRobot).invokeAction("MainMenuButton.ShowMenu")
}
return@step remoteRobot.find(JMenuBarFixture::class.java, JMenuBarFixture.byType())
}

Expand Down

0 comments on commit ff1d138

Please sign in to comment.