Skip to content

Commit 4cae57e

Browse files
Test sources root for IntelliJ or Maven project should be suggested to create (#1310)
Test sources root for IntelliJ or Maven project can be created automatically #1302
1 parent 9a110cd commit 4cae57e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/generator/UtTestsDialogProcessor.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ import java.util.concurrent.TimeUnit
4949
import kotlin.io.path.pathString
5050
import org.utbot.intellij.plugin.generator.CodeGenerationController.getAllTestSourceRoots
5151
import org.utbot.framework.plugin.api.util.LockFile
52+
import org.utbot.intellij.plugin.ui.utils.isBuildWithGradle
5253

5354
object UtTestsDialogProcessor {
5455
private val logger = KotlinLogging.logger {}
@@ -105,7 +106,7 @@ object UtTestsDialogProcessor {
105106
focusedMethods,
106107
UtSettings.utBotGenerationTimeoutInMillis,
107108
)
108-
if (model.getAllTestSourceRoots().isEmpty()) {
109+
if (model.getAllTestSourceRoots().isEmpty() && project.isBuildWithGradle) {
109110
val errorMessage = """
110111
<html>No test source roots found in the project.<br>
111112
Please, <a href="https://www.jetbrains.com/help/idea/testing.html#add-test-root">create or configure</a> at least one test source root.

0 commit comments

Comments
 (0)