diff --git a/its/org.sonarlint.eclipse.its.connected.sc/src/org/sonarlint/eclipse/its/connected/sc/SonarCloudConnectedModeTest.java b/its/org.sonarlint.eclipse.its.connected.sc/src/org/sonarlint/eclipse/its/connected/sc/SonarCloudConnectedModeTest.java index 8e6117fda..5268e0bcb 100644 --- a/its/org.sonarlint.eclipse.its.connected.sc/src/org/sonarlint/eclipse/its/connected/sc/SonarCloudConnectedModeTest.java +++ b/its/org.sonarlint.eclipse.its.connected.sc/src/org/sonarlint/eclipse/its/connected/sc/SonarCloudConnectedModeTest.java @@ -47,13 +47,11 @@ import org.sonarlint.eclipse.its.shared.reddeer.conditions.CFamilyLoaded; import org.sonarlint.eclipse.its.shared.reddeer.conditions.ConfirmConnectionCreationDialogOpened; import org.sonarlint.eclipse.its.shared.reddeer.conditions.DialogMessageIsExpected; -import org.sonarlint.eclipse.its.shared.reddeer.conditions.FileNotFoundDialogOpened; import org.sonarlint.eclipse.its.shared.reddeer.conditions.FixSuggestionAvailableDialogOpened; import org.sonarlint.eclipse.its.shared.reddeer.conditions.FixSuggestionUnavailableDialogOpened; import org.sonarlint.eclipse.its.shared.reddeer.conditions.ProjectBindingWizardIsOpened; import org.sonarlint.eclipse.its.shared.reddeer.conditions.ProjectSelectionDialogOpened; import org.sonarlint.eclipse.its.shared.reddeer.dialogs.ConfirmConnectionCreationDialog; -import org.sonarlint.eclipse.its.shared.reddeer.dialogs.FileNotFoundDialog; import org.sonarlint.eclipse.its.shared.reddeer.dialogs.FixSuggestionAvailableDialog; import org.sonarlint.eclipse.its.shared.reddeer.dialogs.FixSuggestionUnavailableDialog; import org.sonarlint.eclipse.its.shared.reddeer.dialogs.ProjectSelectionDialog; @@ -262,8 +260,10 @@ public void fixSuggestion_with_ConnectionSetup_fileNotFound() throws Interrupted new WaitUntil(new ProjectSelectionDialogOpened()); new ProjectSelectionDialog().ok(); - new WaitUntil(new FileNotFoundDialogOpened()); - new FileNotFoundDialog().ok(); + // The error message from SLCORE is not denoted by a specific title. + var shellOpt = shellByName("SonarQube"); + assertThat(shellOpt).isNotEmpty(); + shellOpt.get().close(); } @Test diff --git a/its/org.sonarlint.eclipse.its.shared/src/org/sonarlint/eclipse/its/shared/reddeer/conditions/FileNotFoundDialogOpened.java b/its/org.sonarlint.eclipse.its.shared/src/org/sonarlint/eclipse/its/shared/reddeer/conditions/FileNotFoundDialogOpened.java deleted file mode 100644 index 2302ce9d9..000000000 --- a/its/org.sonarlint.eclipse.its.shared/src/org/sonarlint/eclipse/its/shared/reddeer/conditions/FileNotFoundDialogOpened.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * SonarLint for Eclipse ITs - * Copyright (C) 2009-2024 SonarSource SA - * sonarlint@sonarsource.com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonarlint.eclipse.its.shared.reddeer.conditions; - -import org.sonarlint.eclipse.its.shared.reddeer.dialogs.FileNotFoundDialog; - -public class FileNotFoundDialogOpened extends AbstractDialogOpened { - public FileNotFoundDialogOpened() { - super(FileNotFoundDialog.class); - } -} diff --git a/its/org.sonarlint.eclipse.its.shared/src/org/sonarlint/eclipse/its/shared/reddeer/dialogs/FileNotFoundDialog.java b/its/org.sonarlint.eclipse.its.shared/src/org/sonarlint/eclipse/its/shared/reddeer/dialogs/FileNotFoundDialog.java deleted file mode 100644 index 8013e861d..000000000 --- a/its/org.sonarlint.eclipse.its.shared/src/org/sonarlint/eclipse/its/shared/reddeer/dialogs/FileNotFoundDialog.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * SonarLint for Eclipse ITs - * Copyright (C) 2009-2024 SonarSource SA - * sonarlint@sonarsource.com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonarlint.eclipse.its.shared.reddeer.dialogs; - -import org.eclipse.reddeer.swt.impl.button.OkButton; -import org.eclipse.reddeer.swt.impl.shell.DefaultShell; - -public class FileNotFoundDialog extends DefaultShell { - public FileNotFoundDialog() { - super("File not found"); - } - - public void ok() { - new OkButton(this).click(); - } -} diff --git a/its/org.sonarlint.eclipse.its.standalone/src/org/sonarlint/eclipse/its/standalone/RulesConfigurationTest.java b/its/org.sonarlint.eclipse.its.standalone/src/org/sonarlint/eclipse/its/standalone/RulesConfigurationTest.java index bc1715be4..42c9573cd 100644 --- a/its/org.sonarlint.eclipse.its.standalone/src/org/sonarlint/eclipse/its/standalone/RulesConfigurationTest.java +++ b/its/org.sonarlint.eclipse.its.standalone/src/org/sonarlint/eclipse/its/standalone/RulesConfigurationTest.java @@ -97,14 +97,13 @@ public void ruleParametersGlobalDefaults() { public void ruleParametersActivationRoundTrip() { var ruleConfigurationPreferences = RuleConfigurationPreferences.open(); var cognitiveComplexityRuleItem = ruleConfigurationPreferences.selectRule("java:S3776", "Java", "Cognitive Complexity of methods should not be too high"); - - assertThat(ruleConfigurationPreferences.getRuleParamSpinner().isEnabled()).isTrue(); + await().untilAsserted(() -> assertThat(ruleConfigurationPreferences.getRuleParamSpinner().isEnabled()).isTrue()); new ContextMenu(cognitiveComplexityRuleItem).getItem("Deactivate").select(); - assertThat(ruleConfigurationPreferences.getRuleParamSpinner().isEnabled()).isFalse(); + await().untilAsserted(() -> assertThat(ruleConfigurationPreferences.getRuleParamSpinner().isEnabled()).isFalse()); new ContextMenu(cognitiveComplexityRuleItem).getItem("Activate").select(); - assertThat(ruleConfigurationPreferences.getRuleParamSpinner().isEnabled()).isTrue(); + await().untilAsserted(() -> assertThat(ruleConfigurationPreferences.getRuleParamSpinner().isEnabled()).isTrue()); ruleConfigurationPreferences.cancel(); } diff --git a/pom.xml b/pom.xml index 3577ffc63..ee71c233c 100644 --- a/pom.xml +++ b/pom.xml @@ -77,7 +77,7 @@ 4.0.8 - 10.11.0.79687 + 10.11.2.79730 11 diff --git a/target-platforms/commons-build.target b/target-platforms/commons-build.target index 6fb6a885a..17cf1c037 100644 --- a/target-platforms/commons-build.target +++ b/target-platforms/commons-build.target @@ -12,7 +12,7 @@ org.sonarsource.sonarlint.core sonarlint-java-client-osgi - 10.11.0.79687 + 10.11.2.79730 jar