Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLE-981,SLE-980: Update labels and icons for rebranding #764

Merged
merged 5 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cirrus.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ qa_connectedModeSonarQube_task:
SQ_VERSION: 'LATEST_RELEASE'
QA_CATEGORY: 'LATEST_RELEASE'
- env:
SQ_VERSION: 'DEV'
SQ_VERSION: '10.8.0.99052'
QA_CATEGORY: 'DEV'
<<: *SETUP_MAVEN_CACHE_QA
<<: *SETUP_ORCHESTRATOR_CACHE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public void fixSuggestion_with_ConnectionSetup_noProject() throws InterruptedExc
new WaitUntil(new ConfirmConnectionCreationDialogOpened(true));
new ConfirmConnectionCreationDialog(true).trust();

shellByName("SonarLint - No mathing open project found")
shellByName("SonarQube Cloud - No matching open project found")
.ifPresent(shell -> {
new DefaultLink(shell, "Open Troubleshooting documentation").click();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ protected static void createConnectionAndBindProject(OrchestratorRule orchestrat
wizard.next();

// as login can take time, wait for the next page to appear
new WaitUntil(new WidgetIsFound(Label.class, new WithTextMatcher("SonarQube Connection Identifier")));
new WaitUntil(new WidgetIsFound(Label.class, new WithTextMatcher("SonarQube Server Connection Identifier")));
var connectionNamePage = new ServerConnectionWizard.ConnectionNamePage(wizard);

connectionNamePage.setConnectionName("test");
Expand Down Expand Up @@ -196,7 +196,7 @@ protected static void createConnectionAndBindProject(OrchestratorRule orchestrat
}

protected static void bindProjectFromContextMenu(Project project, String projectKey) {
new ContextMenu(project.getTreeItem()).getItem("SonarLint", "Bind to SonarQube or SonarCloud...").select();
new ContextMenu(project.getTreeItem()).getItem("SonarQube", "Bind to SonarQube (Server, Cloud)...").select();

var projectBindingWizard = new ProjectBindingWizard();
projectBindingWizard.next();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public void test_open_in_ide_assist_manual_binding() throws IOException, Interru
} catch (Exception err) {
// ================================================================================================================
// INFO: Because of SLE-797 we currently have to bind it manually and trigger it again
var popUp = new DefaultShell("SonarLint - No mathing open project found");
var popUp = new DefaultShell("SonarQube Server - No matching open project found");
new DefaultLink(popUp, "Open Troubleshooting documentation").click();
bindProjectFromContextMenu(rootProject, MAVEN_TAINT_PROJECT_KEY);
triggerOpenInIDE(orchestrator.getServer().getUrl(), branch.getName(), s101.getKey());
Expand Down Expand Up @@ -221,7 +221,7 @@ public void test_open_in_ide_assist_automated_binding_empty_workspace() throws I
new ConfirmConnectionCreationDialog(false).trust();

// 4) await pop-up saying that automatic binding is not possible
var popUp = new DefaultShell("SonarLint - No mathing open project found");
var popUp = new DefaultShell("SonarQube Server - No matching open project found");
new DefaultLink(popUp, "Open Troubleshooting documentation").click();

// 5) Check that token still exists
Expand Down Expand Up @@ -287,7 +287,7 @@ public void test_open_in_ide_assist_automated_binding() throws IOException, Inte
} catch (Exception err) {
// ================================================================================================================
// INFO: Because of SLE-797 we currently have to bind it manually and trigger it again
var popUp = new DefaultShell("SonarLint - No mathing open project found");
var popUp = new DefaultShell("SonarQube Server - No matching open project found");
new DefaultLink(popUp, "Open Troubleshooting documentation").click();
bindProjectFromContextMenu(rootProject, MAVEN_TAINT_PROJECT_KEY);
triggerOpenInIDE(orchestrator.getServer().getUrl(), branch.getName(), s101.getKey());
Expand All @@ -309,7 +309,7 @@ public void test_open_in_ide_assist_automated_binding() throws IOException, Inte

private void closeTaintPopupIfAny() {
try {
new DefaultShell("SonarLint - Taint vulnerability found").close();
new DefaultShell("SonarQube - Taint vulnerability found").close();
} catch (CoreLayerException notFound) {

}
Expand All @@ -326,7 +326,7 @@ public void test_open_in_ide_when_project_already_bound() throws IOException, In
var rootProject = importExistingProjectIntoWorkspace("java/maven-taint", MAVEN_TAINT_PROJECT_KEY);
createConnectionAndBindProject(orchestrator, MAVEN_TAINT_PROJECT_KEY);
try {
new DefaultShell("SonarLint Binding Suggestion").close();
new DefaultShell("SonarQube - Binding Suggestion").close();
} catch (Exception ignored) {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
import org.eclipse.reddeer.swt.impl.link.DefaultLink;
import org.eclipse.reddeer.swt.impl.menu.ContextMenu;
import org.eclipse.reddeer.swt.impl.menu.ContextMenuItem;
import org.eclipse.reddeer.swt.impl.shell.DefaultShell;
import org.eclipse.reddeer.workbench.core.condition.JobIsRunning;
import org.eclipse.reddeer.workbench.impl.editor.DefaultEditor;
import org.eclipse.reddeer.workbench.impl.editor.Marker;
Expand Down Expand Up @@ -172,7 +171,7 @@ public void configureServerFromNewWizard() {
wizard.next();

// as login can take time, wait for the next page to appear
new WaitUntil(new WidgetIsFound(Label.class, new WithTextMatcher("SonarQube Connection Identifier")));
new WaitUntil(new WidgetIsFound(Label.class, new WithTextMatcher("SonarQube Server Connection Identifier")));
var connectionNamePage = new ServerConnectionWizard.ConnectionNamePage(wizard);

assertThat(connectionNamePage.getConnectionName()).isEqualTo("127.0.0.1");
Expand Down Expand Up @@ -241,15 +240,15 @@ public void shouldFindSecretsInConnectedMode() {
createConnectionAndBindProject(orchestrator, SECRET_JAVA_PROJECT_NAME);

// Remove binding suggestion notification
new DefaultLink(shellByName("SonarLint Binding Suggestion").get(), "Don't ask again").click();
new DefaultLink(shellByName("SonarQube - Binding Suggestion").get(), "Don't ask again").click();

waitForAnalysisReady(SECRET_JAVA_PROJECT_NAME);

openFileAndWaitForAnalysisCompletion(rootProject.getResource("src", "sec", "Secret.java"));
waitForMarkers(new DefaultEditor(),
tuple("Make sure this AWS Secret Access Key gets revoked, changed, and removed from the code.", 4));

shellByName("SonarLint - Secret(s) detected").ifPresent(shell -> {
shellByName("SonarQube - Secret(s) detected").ifPresent(shell -> {
assertThat(getNotificationText(shell)).contains(SECRET_JAVA_PROJECT_NAME);
new DefaultLink(shell, "Dismiss").click();
});
Expand All @@ -267,13 +266,13 @@ public void shareConnectedModeConfiguration() {
createConnectionAndBindProject(orchestrator, JAVA_SIMPLE_PROJECT_KEY);

// Remove binding suggestion notification
shellByName("SonarLint Binding Suggestion")
shellByName("SonarQube - Binding Suggestion")
.ifPresent(shell -> new DefaultLink(shell, "Don't ask again").click());

waitForAnalysisReady(JAVA_SIMPLE_PROJECT_KEY);

// Share Connected Mode configuration
new ContextMenu(project.getTreeItem()).getItem("SonarLint", "Share Binding...").select();
new ContextMenu(project.getTreeItem()).getItem("SonarQube", "Share Binding...").select();
new WaitUntil(new ShareConnectedModeConfigurationDialogOpened());

var dialog = new ShareConnectedModeConfigurationDialog();
Expand All @@ -293,7 +292,7 @@ public void shouldAutomaticallyUpdateRuleSetWhenChangedOnServer() throws Excepti
createConnectionAndBindProject(orchestrator, JAVA_SIMPLE_PROJECT_KEY);

// Remove binding suggestion notification
shellByName("SonarLint Binding Suggestion")
shellByName("SonarQube - Binding Suggestion")
.ifPresent(shell -> new DefaultLink(shell, "Don't ask again").click());

waitForAnalysisReady(JAVA_SIMPLE_PROJECT_KEY);
Expand Down Expand Up @@ -352,7 +351,7 @@ public void check_grouping() {
createConnectionAndBindProject(orchestrator, JAVA_SIMPLE_PROJECT_KEY);

// Remove binding suggestion notification
new DefaultLink(shellByName("SonarLint Binding Suggestion").get(), "Don't ask again").click();
new DefaultLink(shellByName("SonarQube - Binding Suggestion").get(), "Don't ask again").click();

waitForAnalysisReady(JAVA_SIMPLE_PROJECT_KEY);

Expand Down Expand Up @@ -428,7 +427,7 @@ public void test_MarkIssueAs_Dialog() {
INSUFFICIENT_PERMISSION_USER);

// 7) Remove binding suggestion notification
new DefaultLink(shellByName("SonarLint Binding Suggestion").get(), "Don't ask again").click();
new DefaultLink(shellByName("SonarQube - Binding Suggestion").get(), "Don't ask again").click();

waitForAnalysisReady(MAVEN2_PROJECT_KEY);

Expand Down Expand Up @@ -471,7 +470,7 @@ public void test_MarkIssueAs_Dialog() {
doAndWaitForSonarLintAnalysisJob(dialog::ok);

// 12) Remove marked as resolved notification
new DefaultLink(shellByName("SonarLint - Issue marked as resolved").get(), "Dismiss").click();
new DefaultLink(shellByName("SonarQube - Issue marked as resolved").get(), "Dismiss").click();

// 13) Assert marker is gone
await().until(() -> onTheFlyView.getIssues(ISSUE_MATCHER), List<SonarLintIssueMarker>::isEmpty);
Expand Down Expand Up @@ -516,14 +515,14 @@ public void test_new_code_period_preference() {
// 3) bind to project on SonarQube / check issues and taint vulnerabilities exist
createConnectionAndBindProject(orchestrator, MAVEN_TAINT_PROJECT_KEY, Server.ADMIN_LOGIN, Server.ADMIN_PASSWORD);

new DefaultLink(shellByName("SonarLint Binding Suggestion").get(), "Don't ask again").click();
new DefaultLink(shellByName("SonarLint - Binding Suggestion").get(), "Don't ask again").click();

waitForAnalysisReady(MAVEN_TAINT_PROJECT_KEY);

await().untilAsserted(() -> assertThat(onTheFlyView.getItems()).hasSize(2));
await().untilAsserted(() -> assertThat(taintVulnerabilitiesView.getItems()).hasSize(1));

new DefaultLink(shellByName("SonarLint - Taint vulnerability found").get(), "Show in view").click();
new DefaultLink(shellByName("SonarQube - Taint vulnerability found").get(), "Show in view").click();

// 4) unbind project / set new code period to "previous version" / run second analysis with a new version
var bindingsView = new BindingsView();
Expand Down Expand Up @@ -584,7 +583,7 @@ public void test_Java_Python_DBD() {

// 3) bind to project on SonarQube / check issues exist now
createConnectionAndBindProject(orchestrator, DBD_PROJECT_KEY, Server.ADMIN_LOGIN, Server.ADMIN_PASSWORD);
shellByName("SonarLint Binding Suggestion").ifPresent(shell -> new DefaultLink(shell, "Don't ask again").click());
shellByName("SonarQube - Binding Suggestion").ifPresent(shell -> new DefaultLink(shell, "Don't ask again").click());

openFileAndWaitForAnalysisCompletion(rootProject.getResource("dbd.py"));
waitForSonarLintMarkers(onTheFlyView,
Expand Down Expand Up @@ -618,16 +617,16 @@ public void test_custom_secrets() {

// 3) bind to project on SonarQube / check issues exist now
createConnectionAndBindProject(orchestrator, CUSTOM_SECRETS_PROJECT_KEY, Server.ADMIN_LOGIN, Server.ADMIN_PASSWORD);
shellByName("SonarLint Binding Suggestion").ifPresent(shell -> new DefaultLink(shell, "Don't ask again").click());

shellByName("SonarLint - Secret(s) detected").ifPresent(shell -> {
assertThat(getNotificationText(shell)).contains(CUSTOM_SECRETS_PROJECT_KEY);
new DefaultLink(shell, "Dismiss").click();
});
shellByName("SonarQube - Binding Suggestion").ifPresent(shell -> new DefaultLink(shell, "Don't ask again").click());

openFileAndWaitForAnalysisCompletion(rootProject.getResource("Heresy.txt"));
waitForMarkers(new DefaultEditor(),
tuple("User-specified secrets should not be disclosed.", 1));

shellByName("SonarQube - Secret(s) detected").ifPresent(shell -> {
assertThat(getNotificationText(shell)).contains(CUSTOM_SECRETS_PROJECT_KEY);
shell.close();
});
}

private static QualityProfile getQualityProfile(String projectKey, String qualityProfileName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public static final void cleanupAfterClass() {
if ("oldest".equals(System.getProperty("target.platform"))) {
Optional<DefaultShell> dialog;
do {
dialog = shellByName("SonarLint - New Eclipse user survey");
dialog = shellByName("SonarQube for Eclipse - New user survey");
dialog.ifPresent(DefaultShell::close);
} while (dialog.isPresent());
}
Expand All @@ -146,6 +146,8 @@ public final void cleanup() {
// this prevents trying to clear the console in the middle of a job
waitSonarLintAnalysisJobs();

shellByName("SonarQube for Eclipse - Release Notes").ifPresent(DefaultShell::close);

var consoleView = new SonarLintConsole();
System.out.println(consoleView.getConsoleView().getConsoleText());
consoleView.clear();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public class ConfirmConnectionCreationDialog extends DefaultShell {

public ConfirmConnectionCreationDialog(Boolean isSonarCloud) {
super(isSonarCloud
? "Do you trust this SonarCloud organization?"
: "Do you trust this SonarQube server?");
? "Do you trust this SonarQube Cloud organization?"
: "Do you trust this SonarQube Server instance?");
this.isSonarCloud = isSonarCloud;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void learnMore() {
}

public void trySonarCloudForFree() {
new CustomButton(this, "Try SonarCloud for free").click();
new CustomButton(this, "Try SonarQube Cloud for free").click();
}

public void dontAskAgain() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

public class FixSuggestionAvailableDialog extends DefaultShell {
public FixSuggestionAvailableDialog(Integer index, Integer all) {
super(String.format("SonarLint Fix Suggestion (%d/%d)", index + 1, all));
super(String.format("SonarQube Fix Suggestion (%d/%d)", index + 1, all));
}

public void applyTheChange() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

public class FixSuggestionUnavailableDialog extends DefaultShell {
public FixSuggestionUnavailableDialog(Integer index, Integer all) {
super(String.format("SonarLint Fix Suggestion (%d/%d)", index + 1, all));
super(String.format("SonarQube Fix Suggestion (%d/%d)", index + 1, all));
}

public void proceed() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

public class ProjectSelectionDialog extends DefaultShell {
public ProjectSelectionDialog() {
super("SonarLint - Project Selection");
super("SonarQube for Eclipse - Project Selection");
}

public void filterProjectName(String projectName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public TrustButton(ReferencedComposite referencedComposite, int index, boolean i
super(referencedComposite,
index,
isSonarCloud
? "Connect to SonarCloud"
: "Connect to this SonarQube server",
? "Connect to SonarQube Cloud"
: "Connect to this SonarQube Server instance",
SWT.PUSH);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class FileExclusionsPreferences extends PropertyPage {
private static final String VALUE_COL = "Value";

public FileExclusionsPreferences(ReferencedComposite referencedComposite) {
super(referencedComposite, new String[] {"SonarLint", "File Exclusions"});
super(referencedComposite, new String[] {"SonarQube", "File Exclusions"});
}

public void add(String exclusion) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

public class ReleaseNotesPreferences extends PropertyPage {
public ReleaseNotesPreferences(WorkbenchPreferenceDialog preferenceDialog) {
super(preferenceDialog, "SonarLint", "Release Notes");
super(preferenceDialog, "SonarQube", "Release Notes");
}

public void cancel() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
public class RuleConfigurationPreferences extends PropertyPage {

public RuleConfigurationPreferences(WorkbenchPreferenceDialog preferenceDialog) {
super(preferenceDialog, "SonarLint", "Rules Configuration");
super(preferenceDialog, "SonarQube", "Rules Configuration");
}

public void add(String exclusion) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import org.eclipse.reddeer.swt.impl.text.DefaultText;

public class SonarLintPreferences extends PropertyPage {
public static final String NAME = "SonarLint";
public static final String NAME = "SonarQube";

public SonarLintPreferences(ReferencedComposite referencedComposite) {
super(referencedComposite, NAME);
Expand All @@ -39,15 +39,15 @@ public void setTestFileRegularExpressions(String regex) {
}

public void setMarkersSeverity(MarkerSeverity severity) {
new DefaultCombo(this, new WithLabelMatcher("SonarLint markers severity:")).setSelection(severity.getTextInCombo());
new DefaultCombo(this, new WithLabelMatcher("SonarQube markers severity:")).setSelection(severity.getTextInCombo());
}

public void setShowAllMarkers(boolean showAllMarkers) {
new CheckBox(this, new WithTextMatcher("Show SonarLint markers for resolved issues as well")).toggle(showAllMarkers);
new CheckBox(this, new WithTextMatcher("Show SonarQube markers for resolved issues as well")).toggle(showAllMarkers);
}

public void setFocusOnNewCode(boolean focusOnNewCode) {
new CheckBox(this, new WithTextMatcher("Show SonarLint markers only for new code")).toggle(focusOnNewCode);
new CheckBox(this, new WithTextMatcher("Show SonarQube markers only for new code")).toggle(focusOnNewCode);
}

public enum MarkerSeverity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

public class SonarLintProperties extends PropertyPage {

public static final String NAME = "SonarLint";
public static final String NAME = "SonarQube";

public SonarLintProperties(ReferencedComposite referencedComposite) {
super(referencedComposite, NAME);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@
public class BindingsView extends WorkbenchView {

public BindingsView() {
super("SonarLint Bindings");
super("SonarQube Bindings");
}

public boolean isBindingEmpty() {
activate();
try {
new DefaultLink(cTabItem, new WithTextMatcher(
"<a>Connect to SonarQube/SonarCloud...</a>"));
"<a>Connect to SonarQube (Server, Cloud)...</a>"));
return true;
} catch (CoreLayerException e) {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
public class IssueLocationsView extends WorkbenchView {

public IssueLocationsView() {
super("SonarLint Issue Locations");
super("SonarQube Issue Locations");
}

public Tree getTree() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
public class OnTheFlyView extends AbstractMarkersSupportView {

public OnTheFlyView() {
super("SonarLint On-The-Fly");
super("SonarQube On-The-Fly");
}

public List<TreeItem> getItems() {
Expand Down
Loading