Skip to content

Commit

Permalink
Remove intellij plugin dependency for UI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPl292 committed Feb 13, 2024
1 parent b972121 commit 3531574
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 81 deletions.
32 changes: 0 additions & 32 deletions tests/ui-fixtures/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
plugins {
java
kotlin("jvm")
id("org.jetbrains.intellij")
id("java-test-fixtures")
}

Expand All @@ -24,7 +23,6 @@ dependencies {
testFixturesImplementation("com.intellij.remoterobot:remote-robot:$remoteRobotVersion")
testFixturesImplementation("com.intellij.remoterobot:remote-fixtures:$remoteRobotVersion")
testFixturesImplementation("com.intellij.remoterobot:ide-launcher:$remoteRobotVersion")
testFixturesImplementation("com.automation-remarks:video-recorder-junit5:2.0")
}

tasks {
Expand All @@ -34,36 +32,6 @@ tasks {
useJUnitPlatform()
enabled = false
}

register<Test>("testUi") {
group = "verification"
useJUnitPlatform()
}

downloadRobotServerPlugin {
version.set(remoteRobotVersion)
}

runIdeForUiTests {
systemProperty("robot-server.port", "8082")
systemProperty("ide.mac.message.dialogs.as.sheets", "false")
systemProperty("jb.privacy.policy.text", "<!--999.999-->")
systemProperty("jb.consents.confirmation.enabled", "false")
systemProperty("ide.show.tips.on.startup.default.value", "false")
}

verifyPlugin {
enabled = false
}

publishPlugin {
enabled = false
}
}

intellij {
version.set(ideaVersion)
type.set("IC")
}

java {
Expand Down
31 changes: 4 additions & 27 deletions tests/ui-ij-tests/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
plugins {
java
kotlin("jvm")
id("org.jetbrains.intellij")
}

repositories {
Expand All @@ -23,7 +22,6 @@ dependencies {

testImplementation("com.intellij.remoterobot:remote-robot:$remoteRobotVersion")
testImplementation("com.intellij.remoterobot:remote-fixtures:$remoteRobotVersion")
testImplementation("com.intellij.remoterobot:ide-launcher:$remoteRobotVersion")
testImplementation("com.automation-remarks:video-recorder-junit5:2.0")
}

Expand All @@ -38,33 +36,12 @@ tasks {
register<Test>("testUi") {
group = "verification"
useJUnitPlatform()
}

downloadRobotServerPlugin {
version.set(remoteRobotVersion)
}

runIdeForUiTests {
systemProperty("robot-server.port", "8082")
systemProperty("ide.mac.message.dialogs.as.sheets", "false")
systemProperty("jb.privacy.policy.text", "<!--999.999-->")
systemProperty("jb.consents.confirmation.enabled", "false")
systemProperty("ide.show.tips.on.startup.default.value", "false")
}

verifyPlugin {
enabled = false
// This is needed for the robot to access the message of the exception
// Usually these opens are provided by the intellij gradle plugin
// https://github.com/JetBrains/gradle-intellij-plugin/blob/b21e3f382e9885948a6427001d5e64234c602613/src/main/kotlin/org/jetbrains/intellij/utils/OpenedPackages.kt#L26
jvmArgs("--add-opens", "java.base/java.lang=ALL-UNNAMED")
}

publishPlugin {
enabled = false
}
}

intellij {
version.set(ideaVersion)
type.set("IC")
plugins.set(listOf("java"))
}

java {
Expand Down
26 changes: 4 additions & 22 deletions tests/ui-py-tests/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
plugins {
java
kotlin("jvm")
id("org.jetbrains.intellij")
}

repositories {
Expand Down Expand Up @@ -38,31 +37,14 @@ tasks {
register<Test>("testUi") {
group = "verification"
useJUnitPlatform()
}

downloadRobotServerPlugin {
version.set(remoteRobotVersion)
}

runIdeForUiTests {
systemProperty("robot-server.port", "8082")
systemProperty("ide.mac.message.dialogs.as.sheets", "false")
systemProperty("jb.privacy.policy.text", "<!--999.999-->")
systemProperty("jb.consents.confirmation.enabled", "false")
systemProperty("ide.show.tips.on.startup.default.value", "false")
systemProperty("eap.require.license", "false")
}

verifyPlugin {
enabled = false
// This is needed for the robot to access the message of the exception
// Usually these opens are provided by the intellij gradle plugin
// https://github.com/JetBrains/gradle-intellij-plugin/blob/b21e3f382e9885948a6427001d5e64234c602613/src/main/kotlin/org/jetbrains/intellij/utils/OpenedPackages.kt#L26
jvmArgs("--add-opens", "java.base/java.lang=ALL-UNNAMED")
}
}

intellij {
version.set(ideaVersion)
type.set("PY")
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(javaVersion))
Expand Down

0 comments on commit 3531574

Please sign in to comment.