kotest / kotest-intellij-plugin

The official Kotest plugin for Intellij and Android Studio
Apache License 2.0
179 stars 25 forks source link

Changes to certain Run Configuration options are not saved #263

Open stgerhardt opened 1 year ago

stgerhardt commented 1 year ago

I have a project using Kotlin multiplatform and Spring Boot that currently only targets the JVM.

If I use a Kotest run configuration, after I've created the initial run configuration there are certain settings I cannot change because they are not persisted, nor does the "Apply" button become enabled after I make changes to the configuration. The main area where I've noticed this in when trying to enable code coverage for a Kotest run configuration - if I click the "Modify" button on the run configurations and choose "Enable code coverage..." the option shows up but the "Apply" button is never enabled, and if I click "OK" to save and close the dialog box, the changes are still not saved. Upon re-opening the run configurations dialog, the Kotest configuration does not include the coverage / tracing option.

If I duplicate a Kotest run configuration and change some of the options before clicking "OK", I am able to enable code coverage and other options successfully. However, from that point forward I cannot disable those options and have it save properly.

Separately, when I edit the run configuration settings to run the project as a Spring Boot app, changes to the run configuration are properly saved, and the "Apply" button is correctly enabled / disabled based on the changes I've made to the run configuration.

Below is a screen recording demonstrating the issue and that only the Kotest run configuration is affected. https://github.com/kotest/kotest-intellij-plugin/assets/113389206/39a424d8-4584-4dbc-9ab1-6a05d9d5d7d2

Let me know if there is any other information I can provide to make diagnosing the problem easier. If I had to guess, I'd suspect that either the Kotest plugin code is somehow not serializing all the changes made to the run configurations dialog, or is potentially not calling the super method to defer some of the settings persistence (like the code coverage options) to IntelliJ's built in behavior.

Thanks in advance!

stgerhardt commented 1 year ago

Forgot to mention version numbers - I'm using IDEA 2023.2 Ultimate and Kotest plugin version 1.3.69-IC-232-EAP-SNAPSHOT.