File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/ui Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -418,7 +418,7 @@ class GenerateTestsDialogWindow(val model: GenerateTestsModel) : DialogWrapper(m
418418 " Mocks will be used when necessary."
419419 )
420420 }
421- row(" Tests type:" ) {
421+ row(" Test type:" ) {
422422 cell(springTestType)
423423 contextHelp(
424424 " Unit tests do not initialize ApplicationContext <br>" +
@@ -667,6 +667,19 @@ class GenerateTestsDialogWindow(val model: GenerateTestsModel) : DialogWrapper(m
667667 }
668668
669669 override fun doOKAction () {
670+ if (isSpringConfigSelected()
671+ && springTestType.selectedItem == INTEGRATION_TEST
672+ && Messages .showYesNoDialog(
673+ model.project,
674+ " Generating \" Integration tests\" may lead to corrupting user data or inflicting other harm.\n " +
675+ " Please use a test configuration or profile." ,
676+ " Warning" ,
677+ " Proceed" ,
678+ " Go Back" ,
679+ Messages .getWarningIcon()
680+ ) != Messages .YES ) {
681+ return ;
682+ }
670683 fun now () = LocalDateTime .now().format(DateTimeFormatter .ofPattern(" HH:mm:ss.SSS" ))
671684
672685 logger.info { " Tests generation instantiation phase started at ${now()} " }
You can’t perform that action at this time.
0 commit comments