mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-04-29 20:34:08 +02:00
Extract UI tests into the separate module
This commit is contained in:
parent
8e6c490c62
commit
27a689e7b8
8
.github/workflows/runUiOctopusTests.yml
vendored
8
.github/workflows/runUiOctopusTests.yml
vendored
@ -11,12 +11,12 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Apply Patch
|
||||
run: |
|
||||
git apply src/test/java/ui/octopus.patch
|
||||
git apply tests/ij-ui-tests/src/test/kotlin/ui/octopus.patch
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: zulu
|
||||
java-version: 11
|
||||
java-version: 17
|
||||
- name: Setup FFmpeg
|
||||
uses: FedericoCarboni/setup-ffmpeg@v3
|
||||
with:
|
||||
@ -30,7 +30,7 @@ jobs:
|
||||
- name: Run Idea
|
||||
run: |
|
||||
mkdir -p build/reports
|
||||
gradle :runIdeForUiTests > build/reports/idea.log &
|
||||
gradle :tests:ij-ui-tests:runIdeForUiTests > build/reports/idea.log &
|
||||
- name: Wait for Idea started
|
||||
uses: jtalk/url-health-check-action@v3
|
||||
with:
|
||||
@ -38,7 +38,7 @@ jobs:
|
||||
max-attempts: 20
|
||||
retry-delay: 10s
|
||||
- name: Tests
|
||||
run: gradle :testUi
|
||||
run: gradle :tests:ij-ui-tests:testUi
|
||||
- name: Move video
|
||||
if: always()
|
||||
run: mv video build/reports
|
||||
|
6
.github/workflows/runUiTests.yml
vendored
6
.github/workflows/runUiTests.yml
vendored
@ -13,7 +13,7 @@ jobs:
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: zulu
|
||||
java-version: 11
|
||||
java-version: 17
|
||||
- name: Setup FFmpeg
|
||||
uses: FedericoCarboni/setup-ffmpeg@v3
|
||||
with:
|
||||
@ -27,7 +27,7 @@ jobs:
|
||||
- name: Run Idea
|
||||
run: |
|
||||
mkdir -p build/reports
|
||||
gradle :runIdeForUiTests > build/reports/idea.log &
|
||||
gradle :tests:ij-ui-tests:runIdeForUiTests > build/reports/idea.log &
|
||||
- name: Wait for Idea started
|
||||
uses: jtalk/url-health-check-action@v3
|
||||
with:
|
||||
@ -35,7 +35,7 @@ jobs:
|
||||
max-attempts: 20
|
||||
retry-delay: 10s
|
||||
- name: Tests
|
||||
run: gradle :testUi
|
||||
run: gradle :tests:ij-ui-tests:testUi
|
||||
- name: Move video
|
||||
if: always()
|
||||
run: mv video build/reports
|
||||
|
@ -101,7 +101,6 @@ val ideaVersion: String by project
|
||||
val ideaType: String by project
|
||||
val downloadIdeaSources: String by project
|
||||
val instrumentPluginCode: String by project
|
||||
val remoteRobotVersion: String by project
|
||||
val antlrVersion: String by project
|
||||
|
||||
val publishChannels: String by project
|
||||
@ -144,11 +143,6 @@ dependencies {
|
||||
// https://mvnrepository.com/artifact/org.mockito.kotlin/mockito-kotlin
|
||||
testImplementation("org.mockito.kotlin:mockito-kotlin:5.2.1")
|
||||
|
||||
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")
|
||||
|
||||
testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.1")
|
||||
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.10.1")
|
||||
testImplementation("org.junit.jupiter:junit-jupiter-params:5.10.1")
|
||||
@ -244,10 +238,6 @@ intellij {
|
||||
}
|
||||
|
||||
tasks {
|
||||
downloadRobotServerPlugin {
|
||||
version.set(remoteRobotVersion)
|
||||
}
|
||||
|
||||
publishPlugin {
|
||||
channels.set(publishChannels.split(","))
|
||||
token.set(publishToken)
|
||||
@ -259,14 +249,6 @@ tasks {
|
||||
password.set(providers.environmentVariable("PRIVATE_KEY_PASSWORD"))
|
||||
}
|
||||
|
||||
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")
|
||||
}
|
||||
|
||||
runPluginVerifier {
|
||||
downloadDir.set("${project.buildDir}/pluginVerifier/ides")
|
||||
teamCityOutputFormat.set(true)
|
||||
@ -348,12 +330,6 @@ tasks {
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register<Test>("testUi") {
|
||||
group = "verification"
|
||||
useJUnitPlatform()
|
||||
include("/ui/**")
|
||||
}
|
||||
|
||||
// --- Changelog
|
||||
|
||||
changelog {
|
||||
@ -372,13 +348,6 @@ koverMerged {
|
||||
enable()
|
||||
}
|
||||
|
||||
kover {
|
||||
instrumentation {
|
||||
// set of test tasks names to exclude from instrumentation. The results of their execution will not be presented in the report
|
||||
excludeTasks += "testUi"
|
||||
}
|
||||
}
|
||||
|
||||
// --- Slack notification
|
||||
|
||||
tasks.register("slackNotification") {
|
||||
|
@ -15,3 +15,4 @@ include 'annotation-processors'
|
||||
include 'tests:java-tests'
|
||||
include 'tests:property-tests'
|
||||
include 'tests:long-running-tests'
|
||||
include 'tests:ij-ui-tests'
|
||||
|
74
tests/ij-ui-tests/build.gradle.kts
Normal file
74
tests/ij-ui-tests/build.gradle.kts
Normal file
@ -0,0 +1,74 @@
|
||||
plugins {
|
||||
java
|
||||
kotlin("jvm")
|
||||
id("org.jetbrains.intellij")
|
||||
}
|
||||
|
||||
group = "org.example"
|
||||
version = "SNAPSHOT"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url = uri("https://cache-redirector.jetbrains.com/intellij-dependencies") }
|
||||
}
|
||||
|
||||
val kotlinVersion: String by project
|
||||
val ideaVersion: String by project
|
||||
val javaVersion: String by project
|
||||
val remoteRobotVersion: String by project
|
||||
|
||||
dependencies {
|
||||
testImplementation("org.junit.jupiter:junit-jupiter")
|
||||
compileOnly("org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion")
|
||||
testImplementation("org.jetbrains.kotlin:kotlin-test:$kotlinVersion")
|
||||
testImplementation(testFixtures(project(":"))) // The root project
|
||||
|
||||
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")
|
||||
}
|
||||
|
||||
tasks {
|
||||
// This task is disabled because it should be excluded from `gradle test` run (because it's slow)
|
||||
// I didn't find a better way to exclude except disabling and defining a new task with a different name
|
||||
test {
|
||||
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")
|
||||
}
|
||||
}
|
||||
|
||||
intellij {
|
||||
version.set(ideaVersion)
|
||||
type.set("IC")
|
||||
plugins.set(listOf("java"))
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion.set(JavaLanguageVersion.of(javaVersion))
|
||||
}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain {
|
||||
languageVersion.set(JavaLanguageVersion.of(javaVersion))
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003-2023 The IdeaVim authors
|
||||
* Copyright 2003-2024 The IdeaVim authors
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE.txt file or at
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003-2023 The IdeaVim authors
|
||||
* Copyright 2003-2024 The IdeaVim authors
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE.txt file or at
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003-2023 The IdeaVim authors
|
||||
* Copyright 2003-2024 The IdeaVim authors
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE.txt file or at
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003-2023 The IdeaVim authors
|
||||
* Copyright 2003-2024 The IdeaVim authors
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE.txt file or at
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003-2023 The IdeaVim authors
|
||||
* Copyright 2003-2024 The IdeaVim authors
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE.txt file or at
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003-2023 The IdeaVim authors
|
||||
* Copyright 2003-2024 The IdeaVim authors
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE.txt file or at
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003-2023 The IdeaVim authors
|
||||
* Copyright 2003-2024 The IdeaVim authors
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE.txt file or at
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003-2023 The IdeaVim authors
|
||||
* Copyright 2003-2024 The IdeaVim authors
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE.txt file or at
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003-2023 The IdeaVim authors
|
||||
* Copyright 2003-2024 The IdeaVim authors
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE.txt file or at
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003-2023 The IdeaVim authors
|
||||
* Copyright 2003-2024 The IdeaVim authors
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE.txt file or at
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003-2023 The IdeaVim authors
|
||||
* Copyright 2003-2024 The IdeaVim authors
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE.txt file or at
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003-2023 The IdeaVim authors
|
||||
* Copyright 2003-2024 The IdeaVim authors
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE.txt file or at
|
Loading…
Reference in New Issue
Block a user