diff --git a/plugins/testng/src/com/theoryinpractice/testng/configuration/TestNGConfigurationEditor.java b/plugins/testng/src/com/theoryinpractice/testng/configuration/TestNGConfigurationEditor.java index 2466d11f3689..de10fb9c7192 100644 --- a/plugins/testng/src/com/theoryinpractice/testng/configuration/TestNGConfigurationEditor.java +++ b/plugins/testng/src/com/theoryinpractice/testng/configuration/TestNGConfigurationEditor.java @@ -159,9 +159,11 @@ public class TestNGConfigurationEditor extends Se }); panel.add(editBtn, BorderLayout.EAST); - final CollectionComboBoxModel testKindModel = new CollectionComboBoxModel<>(Arrays.asList(TestType.values())); - if (!Registry.is("testDiscovery.enabled")) { - testKindModel.remove(TestType.SOURCE); + final CollectionComboBoxModel testKindModel = new CollectionComboBoxModel<>(); + for (TestType type : TestType.values()) { + if (type != TestType.SOURCE || Registry.is("testDiscovery.enabled")) { + testKindModel.add(type); + } } myTestKind.setModel(testKindModel); myTestKind.addActionListener(new ActionListener() {