Skip to content

Commit

Permalink
SLI-1674 Update labels to match the rebranding
Browse files Browse the repository at this point in the history
  • Loading branch information
nquinquenel committed Nov 7, 2024
1 parent efbb67a commit c59f34d
Show file tree
Hide file tree
Showing 97 changed files with 299 additions and 266 deletions.
5 changes: 3 additions & 2 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ Contributing

If you would like to see a new feature, please create a new thread in the forum ["Suggest new features"](https://community.sonarsource.com/c/suggestions/features).

Please be aware that we are not actively looking for feature contributions. The truth is that it's extremely difficult for someone outside SonarSource to comply with our roadmap and expectations. Therefore, we typically only accept minor cosmetic changes and typo fixes.
Please be aware that we are not actively looking for feature contributions. The truth is that it's extremely difficult for someone outside
Sonar to comply with our roadmap and expectations. Therefore, we typically only accept minor cosmetic changes and typo fixes.

With that in mind, if you would like to submit a code contribution, please create a pull request for this repository. Please explain your motives to contribute this change: what problem you are trying to fix, what improvement you are trying to make.

Make sure that you follow our [code style](https://github.com/SonarSource/sonar-developer-toolset#code-style) and all tests are passing.

Thank You! The SonarSource Team
Thank You! The Sonar Team
5 changes: 2 additions & 3 deletions its/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ tasks.test {
useJUnitPlatform {
val tag = System.getenv("TEST_SUITE")

if (tag != null && (tag.equals("OpenInIdeTests") || tag.equals("ConnectedAnalysisTests")
|| tag.equals("ConfigurationTests") || tag.equals("Standalone"))
if (tag != null && (tag == "OpenInIdeTests" || tag == "ConnectedAnalysisTests"
|| tag == "ConfigurationTests" || tag == "Standalone")
) {
includeTags(tag)
}
Expand All @@ -58,7 +58,6 @@ tasks.downloadRobotServerPlugin {
}

val ijVersion: String by project
val intellijBuildVersion: String by project

intellij {
if (project.hasProperty("ijVersion")) {
Expand Down
2 changes: 1 addition & 1 deletion its/src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<name>SonarLint-ITs</name>
<version>1.0</version>
<vendor url="https://sonarsource.com">SonarSource</vendor>
<description>Fake Plugin To Run SonarLint UI tests with multiple flavors</description>
<description>Fake Plugin To Run SonarQube for IntelliJ UI tests with multiple flavors</description>

<idea-version since-build="223.8214.6"/>

Expand Down
6 changes: 3 additions & 3 deletions its/src/test/kotlin/org/sonarlint/intellij/its/BaseUiTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ open class BaseUiTest {
closeAllDialogs()
optionalStep {
sonarlintLogPanel {
println("SonarLint log outputs:")
println("SonarQube for IntelliJ log outputs:")
println(console().text)
toolBarButton("Clear SonarLint Console").click()
toolBarButton("Clear SonarQube for IntelliJ Console").click()
}
}
if (remoteRobot.isCLion()) {
Expand Down Expand Up @@ -157,7 +157,7 @@ open class BaseUiTest {
private fun sonarlintLogPanel(function: TabContentFixture.() -> Unit = {}) {
with(remoteRobot) {
idea {
toolWindow("SonarLint") {
toolWindow("SonarQube for IntelliJ") {
ensureOpen()
tabTitleContains("Log") { select() }
content("SonarLintLogPanel") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class IdeaFrame(remoteRobot: RemoteRobot, remoteComponent: RemoteComponent) : Co

fun IdeaFrame.analyzeFile() {
editorComponent().rightClick()
actionMenuItem("Analyze with SonarLint") {
actionMenuItem("Analyze with SonarQube for IntelliJ") {
click()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ class ConnectedAnalysisTests : BaseUiTest() {
"Change this code to not construct SQL queries directly from user-controlled data."
)
enableConnectedModeFromTaintPanel(TAINT_VULNERABILITY_PROJECT_KEY, false, "Orchestrator")
verifyTaintTabContainsMessages("The project is not bound to SonarCloud/SonarQube")
verifyTaintTabContainsMessages("The project is not bound to SonarQube (Server, Cloud)")
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class CurrentFileTabTests {
fun verifyCurrentFileShowsCard(expectedClass: String) {
with(remoteRobot) {
idea {
toolWindow("SonarLint") {
toolWindow("SonarQube for IntelliJ") {
ensureOpen()
assertThat(findCard(expectedClass)).isNotNull
}
Expand All @@ -47,11 +47,11 @@ class CurrentFileTabTests {
}

fun changeStatusOnSonarQubeAndPressChange(status: String) {
changeStatusAndPressChange("Mark Issue as Resolved on SonarQube", status)
changeStatusAndPressChange("Mark Issue as Resolved on SonarQube Server", status)
}

fun changeStatusOnSonarCloudAndPressChange(status: String) {
changeStatusAndPressChange("Mark Issue as Resolved on SonarCloud", status)
changeStatusAndPressChange("Mark Issue as Resolved on SonarQube Cloud", status)
}

private fun changeStatusAndPressChange(windowTitle: String, status: String) {
Expand Down Expand Up @@ -82,7 +82,7 @@ class CurrentFileTabTests {
with(remoteRobot) {
idea {
notification("The issue was successfully marked as resolved")
toolWindow("SonarLint") {
toolWindow("SonarQube for IntelliJ") {
content("CurrentFilePanel") {
hasText("No issues found in the current opened file")
}
Expand All @@ -94,7 +94,7 @@ class CurrentFileTabTests {
fun openIssueReviewDialogFromList(issueMessage: String) {
with(remoteRobot) {
idea {
toolWindow("SonarLint") {
toolWindow("SonarQube for IntelliJ") {
ensureOpen()
closeAllGotItTooltips()
tabTitleContains("Current File") { select() }
Expand All @@ -110,7 +110,7 @@ class CurrentFileTabTests {
fun verifyCurrentFileTabContainsMessages(vararg expectedMessages: String) {
with(remoteRobot) {
idea {
toolWindow("SonarLint") {
toolWindow("SonarQube for IntelliJ") {
ensureOpen()
tabTitleContains("Current File") { select() }
content("CurrentFilePanel") {
Expand All @@ -129,7 +129,7 @@ class CurrentFileTabTests {
fun clickCurrentFileIssue(issueMessage: String) {
with(remoteRobot) {
idea {
toolWindow("SonarLint") {
toolWindow("SonarQube for IntelliJ") {
ensureOpen()
tabTitleContains("Current File") { select() }
closeAllGotItTooltips()
Expand All @@ -143,11 +143,11 @@ class CurrentFileTabTests {

fun enableConnectedModeFromCurrentFilePanel(projectKey: String?, enabled: Boolean, connectionName: String) {
optionalIdeaFrame()?.apply {
toolWindow("SonarLint") {
toolWindow("SonarQube for IntelliJ") {
ensureOpen()
tabTitleContains("Current File") { select() }
content("CurrentFilePanel") {
toolBarButton("Configure SonarLint").click()
toolBarButton("Configure SonarQube for IntelliJ").click()
}
}
if (enabled) {
Expand All @@ -161,7 +161,7 @@ class CurrentFileTabTests {
fun verifyCurrentFileRuleDescriptionTabContains(expectedMessage: String) {
with(remoteRobot) {
idea {
toolWindow("SonarLint") {
toolWindow("SonarQube for IntelliJ") {
ensureOpen()
content("CurrentFilePanel") {
waitFor(Duration.ofMinutes(1), errorMessage = "Unable to find '$expectedMessage' in: ${findAllText()}") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class OpenInIdeTests {
idea {
dialog("Trust This SonarQube Server?") {
jbTextFields()[1].text = "Orchestrator"
buttonContainsText("Connect to This SonarQube").click()
buttonContainsText("Connect to This SonarQube Server").click()
}
}
}
Expand All @@ -74,9 +74,9 @@ class OpenInIdeTests {
fun acceptNewSCAutomatedConnection() {
with(remoteRobot) {
idea {
dialog("Trust This SonarCloud Organization?") {
dialog("Trust This SonarQube Cloud Organization?") {
jbTextFields()[1].text = "sonarlint-it"
buttonContainsText("Connect to This SonarCloud Organization").click()
buttonContainsText("Connect to This SonarQube Cloud Organization").click()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ReportTabTests {
with(remoteRobot) {
idea {
analyzeFile()
toolWindow("SonarLint") {
toolWindow("SonarQube for IntelliJ") {
ensureOpen()
content("ReportPanel") {
expectedMessages.forEach { assertThat(hasText(it)).isTrue() }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class SecurityHotspotTabTests {
fun openSecurityHotspotReviewDialogFromList(securityHotspotMessage: String) {
with(remoteRobot) {
idea {
toolWindow("SonarLint") {
toolWindow("SonarQube for IntelliJ") {
ensureOpen()
tabTitleContains("Security Hotspots") { select() }
content("SecurityHotspotTree") {
Expand All @@ -53,7 +53,7 @@ class SecurityHotspotTabTests {
fun changeSecurityHotspotStatusAndPressChange(status: String) {
with(remoteRobot) {
idea {
dialog("Change Security Hotspot Status on SonarQube") {
dialog("Change Security Hotspot Status on SonarQube Server") {
content(status) {
click()
}
Expand All @@ -67,7 +67,7 @@ class SecurityHotspotTabTests {
with(remoteRobot) {
idea {
notification("The Security Hotspot status was successfully updated")
toolWindow("SonarLint") {
toolWindow("SonarQube for IntelliJ") {
content("SecurityHotspotsPanel") {
hasText("No Security Hotspots shown due to the current filtering")
}
Expand All @@ -79,7 +79,7 @@ class SecurityHotspotTabTests {
fun verifySecurityHotspotTabContainsMessages(vararg expectedMessages: String) {
with(remoteRobot) {
idea {
toolWindow("SonarLint") {
toolWindow("SonarQube for IntelliJ") {
ensureOpen()
tabTitleContains("Security Hotspots") { select() }
content("SecurityHotspotsPanel") {
Expand All @@ -93,7 +93,7 @@ class SecurityHotspotTabTests {
fun verifySecurityHotspotTreeContainsMessages(vararg expectedMessages: String) {
with(remoteRobot) {
idea {
toolWindow("SonarLint") {
toolWindow("SonarQube for IntelliJ") {
ensureOpen()
tabTitleContains("Security Hotspots") { select() }
content("SecurityHotspotTree") {
Expand All @@ -107,11 +107,11 @@ class SecurityHotspotTabTests {
fun enableConnectedModeFromSecurityHotspotPanel(projectKey: String, enabled: Boolean, connectionName: String) {
with(remoteRobot) {
idea {
toolWindow("SonarLint") {
toolWindow("SonarQube for IntelliJ") {
ensureOpen()
tabTitleContains("Security Hotspots") { select() }
content("SecurityHotspotsPanel") {
toolBarButton("Configure SonarLint").click()
toolBarButton("Configure SonarQube for IntelliJ").click()
}
}
if (enabled) {
Expand All @@ -126,7 +126,7 @@ class SecurityHotspotTabTests {
fun verifySecurityHotspotRuleDescriptionTabContains(expectedMessage: String) {
with(remoteRobot) {
idea {
toolWindow("SonarLint") {
toolWindow("SonarQube for IntelliJ") {
ensureOpen()
content("SecurityHotspotsPanel") {
waitFor(Duration.ofMinutes(1), errorMessage = "Unable to find '$expectedMessage' in: ${findAllText()}") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class SharedConfigurationTests {
notificationByActionName("Use configuration").click()
dialog("Connect to This SonarQube Server?") {
jBPasswordField().text = token
buttonContainsText("Connect to This SonarQube").click()
buttonContainsText("Connect to This SonarQube Server").click()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class TaintVulnerabilityTests {
fun verifyTaintTabContainsMessages(vararg expectedMessages: String) {
with(remoteRobot) {
idea {
toolWindow("SonarLint") {
toolWindow("SonarQube for IntelliJ") {
ensureOpen()
tabTitleContains("Taint Vulnerabilities") { select() }
content("TaintVulnerabilitiesPanel") {
Expand All @@ -48,11 +48,11 @@ class TaintVulnerabilityTests {
fun enableConnectedModeFromTaintPanel(projectKey: String, enabled: Boolean, connectionName: String) {
with(remoteRobot) {
idea {
toolWindow("SonarLint") {
toolWindow("SonarQube for IntelliJ") {
ensureOpen()
tabTitleContains("Taint Vulnerabilities") { select() }
content("TaintVulnerabilitiesPanel") {
toolBarButton("Configure SonarLint").click()
toolBarButton("Configure SonarQube for IntelliJ").click()
}
}
if (enabled) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class PLSQLTest : BaseUiTest() {
private fun verifyIssueTreeContainsMessages() {
with(remoteRobot) {
idea {
toolWindow("SonarLint") {
toolWindow("SonarQube for IntelliJ") {
ensureOpen()
tabTitleContains("Current File") { select() }
// the synchronization can take a while to happen
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ class ExclusionUtils {
private fun openExclusionsTab() {
with(remoteRobot) {
idea {
toolWindow("SonarLint") {
toolWindow("SonarQube for IntelliJ") {
ensureOpen()
tabTitleContains("Current File") { select() }
content("CurrentFilePanel") {
toolBarButton("Configure SonarLint").click()
toolBarButton("Configure SonarQube for IntelliJ").click()
}
selectExclusionTab()
}
Expand Down Expand Up @@ -88,7 +88,7 @@ class ExclusionUtils {
dialog("Project Settings") {
findText("File Exclusions").click()
actionButtons(ActionButtonFixture.byType())[0].clickWhenEnabled()
dialog("Add SonarLint File Exclusion") {
dialog("Add SonarQube for IntelliJ File Exclusion") {
jbTextFieldsWithBrowseButton()[0].click()
keyboard { enterText(fileName) }
waitFor(Duration.ofSeconds(1)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class FiltersUtils {

fun setFocusOnNewCode(focusOnNewCode: Boolean) {
optionalIdeaFrame()?.apply {
toolWindow("SonarLint") {
toolWindow("SonarQube for IntelliJ") {
ensureOpen()
tabTitleContains("Current File") { select() }
content("CurrentFilePanel") {
Expand All @@ -56,7 +56,7 @@ class FiltersUtils {
fun showResolvedIssues() {
with(BaseUiTest.remoteRobot) {
idea {
toolWindow("SonarLint") {
toolWindow("SonarQube for IntelliJ") {
ensureOpen()
tabTitleContains("Current File") { select() }
content("CurrentFilePanel") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ProjectBindingUtils {
with(remoteRobot) {
idea {
dialog("Project Settings") {
checkBox("Bind project to SonarCloud / SonarQube").unselect()
checkBox("Bind project to SonarQube (Server, Cloud)").unselect()
if (isRider()) {
button("Save").click()
} else {
Expand All @@ -57,7 +57,7 @@ class ProjectBindingUtils {
with(remoteRobot) {
idea {
dialog("Project Settings") {
checkBox("Bind project to SonarCloud / SonarQube").select()
checkBox("Bind project to SonarQube (Server, Cloud)").select()
comboBox("Connection:").click()
remoteRobot.find<ContainerFixture>(byXpath("//div[@class='CustomComboPopup']")).apply {
waitFor(Duration.ofSeconds(5)) { hasText(connectionName) }
Expand All @@ -75,9 +75,9 @@ class ProjectBindingUtils {
fun bindProjectAndModuleInFileSettings() {
sonarLintGlobalSettings {
tree {
clickPath("Tools", "SonarLint", "Project Settings")
clickPath("Tools", "SonarQube for IntelliJ", "Project Settings")
}
checkBox("Bind project to SonarCloud / SonarQube").select()
checkBox("Bind project to SonarQube (Server, Cloud)").select()
pressOk()
errorMessage("Connection should not be empty")

Expand All @@ -100,7 +100,7 @@ class ProjectBindingUtils {
pressOk()
errorMessage("Project key for module 'sample-scala-module' should not be empty")
buttons(JButtonFixture.byText("Search in list\u2026"))[1].click()
dialog("Select SonarQube Project To Bind") {
dialog("Select SonarQube Server Project To Bind") {
jList {
clickItem(MODULE_PROJECT_KEY, false)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ class SettingsUtils {
Pause.pause(3000)

// Search for SonarLint because sometimes it is off the screen
search("SonarLint")
search("SonarQube for IntelliJ")

tree {
waitUntilLoaded()
// little trick to check if the search has been applied
waitFor(Duration.ofSeconds(10), Duration.ofSeconds(1)) { collectRows().size in 1..10 }
Pause.pause(1000)
clickPath("Tools", "SonarLint")
clickPath("Tools", "SonarQube for IntelliJ")
}

// let the SonarLint view settle (sometimes the UI thread blocks for a few seconds)
Expand Down
Loading

0 comments on commit c59f34d

Please sign in to comment.