aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorDavid Cho-Lerat <david.cho-lerat@sonarsource.com>2024-11-26 11:51:08 +0100
committersonartech <sonartech@sonarsource.com>2024-11-26 20:02:51 +0000
commit0d259a3fde3c05794b229ce349b469b46415dc46 (patch)
treecb5e2dd8a9ac560dee4dcc9f0b8493d0dfb2d7a9 /server
parentb0346114b8eebc086def01b0b904ad3069ddc2ee (diff)
downloadsonarqube-0d259a3fde3c05794b229ce349b469b46415dc46.tar.gz
sonarqube-0d259a3fde3c05794b229ce349b469b46415dc46.zip
SONAR-23742 Update edition name in footer
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/src/main/js/app/components/__tests__/GlobalFooter-test.tsx9
-rw-r--r--server/sonar-web/src/main/js/app/components/__tests__/StartupModal-test.tsx3
-rw-r--r--server/sonar-web/src/main/js/apps/marketplace/App.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/marketplace/components/EditionBox.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmIntegration-it.tsx4
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/other/__tests__/DoneNextSteps-it.tsx3
-rw-r--r--server/sonar-web/src/main/js/helpers/editions.ts2
7 files changed, 16 insertions, 9 deletions
diff --git a/server/sonar-web/src/main/js/app/components/__tests__/GlobalFooter-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/GlobalFooter-test.tsx
index b9976eb3e21..004b857d034 100644
--- a/server/sonar-web/src/main/js/app/components/__tests__/GlobalFooter-test.tsx
+++ b/server/sonar-web/src/main/js/app/components/__tests__/GlobalFooter-test.tsx
@@ -21,6 +21,7 @@
import { addDays, subDays } from 'date-fns';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import SystemServiceMock from '../../../api/mocks/SystemServiceMock';
+import { getEdition } from '../../../helpers/editions';
import { mockAppState } from '../../../helpers/testMocks';
import { renderComponent } from '../../../helpers/testReactTestingUtils';
import { AppState } from '../../../types/appstate';
@@ -30,6 +31,8 @@ import GlobalFooter from '../GlobalFooter';
const systemMock = new SystemServiceMock();
+const COMMUNITY = getEdition(EditionKey.community).name;
+
afterEach(() => {
systemMock.reset();
});
@@ -41,7 +44,7 @@ it('should render the logged-in information', async () => {
expect(ui.footerListItems.getAll()).toHaveLength(7);
- expect(byText('Community Edition').get()).toBeInTheDocument();
+ expect(byText(COMMUNITY).get()).toBeInTheDocument();
expect(await ui.versionLabel('4.2').find()).toBeInTheDocument();
expect(ui.ltaDocumentationLinkActive.query()).not.toBeInTheDocument();
expect(ui.apiLink.get()).toBeInTheDocument();
@@ -80,7 +83,7 @@ it('should not render missing logged-in information', () => {
expect(ui.footerListItems.getAll()).toHaveLength(5);
- expect(byText('Community Edition').query()).not.toBeInTheDocument();
+ expect(byText(COMMUNITY).query()).not.toBeInTheDocument();
expect(ui.versionLabel().query()).not.toBeInTheDocument();
});
@@ -91,7 +94,7 @@ it('should not render the logged-in information', () => {
expect(ui.footerListItems.getAll()).toHaveLength(4);
- expect(byText('Community Edition').query()).not.toBeInTheDocument();
+ expect(byText(COMMUNITY).query()).not.toBeInTheDocument();
expect(ui.versionLabel().query()).not.toBeInTheDocument();
expect(ui.apiLink.query()).not.toBeInTheDocument();
});
diff --git a/server/sonar-web/src/main/js/app/components/__tests__/StartupModal-test.tsx b/server/sonar-web/src/main/js/app/components/__tests__/StartupModal-test.tsx
index 0fe62d2a16c..7a80d674f83 100644
--- a/server/sonar-web/src/main/js/app/components/__tests__/StartupModal-test.tsx
+++ b/server/sonar-web/src/main/js/app/components/__tests__/StartupModal-test.tsx
@@ -21,6 +21,7 @@
import userEvent from '@testing-library/user-event';
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import { showLicense } from '../../../api/editions';
+import { getEdition } from '../../../helpers/editions';
import { save } from '../../../helpers/storage';
import { mockAppState, mockCurrentUser } from '../../../helpers/testMocks';
import { renderApp } from '../../../helpers/testReactTestingUtils';
@@ -74,7 +75,7 @@ it('should check license and open on its own', async () => {
it.each([
[
- 'community edition',
+ getEdition(EditionKey.community).name,
{ appState: mockAppState({ canAdmin: true, edition: EditionKey.community }) },
],
['Cannot admin', { appState: mockAppState({ canAdmin: false, edition: EditionKey.enterprise }) }],
diff --git a/server/sonar-web/src/main/js/apps/marketplace/App.tsx b/server/sonar-web/src/main/js/apps/marketplace/App.tsx
index f2eed687138..35841b24c62 100644
--- a/server/sonar-web/src/main/js/apps/marketplace/App.tsx
+++ b/server/sonar-web/src/main/js/apps/marketplace/App.tsx
@@ -158,7 +158,7 @@ class App extends React.PureComponent<Props, State> {
/*
* standalone mode is true when cluster mode is not active. We preserve this
- * condition if it ever becomes possible to have a community edition NOT in standalone mode.
+ * condition if it ever becomes possible to have a community build NOT in standalone mode.
*/
const allowActions =
currentEdition === EditionKey.community &&
diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/EditionBox.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/EditionBox.tsx
index dd74dddb1ef..2116011b351 100644
--- a/server/sonar-web/src/main/js/apps/marketplace/components/EditionBox.tsx
+++ b/server/sonar-web/src/main/js/apps/marketplace/components/EditionBox.tsx
@@ -94,7 +94,7 @@ export default function EditionBox({ edition }: Readonly<Props>) {
<p className="sw-mt-4">
<em>Built for Developers by Developers</em>
</p>
- <p className="sw-mt-4">Community Edition functionality plus:</p>
+ <p className="sw-mt-4">Community Build functionality plus:</p>
<UnorderedList className="sw-ml-8" ticks>
<li>
<span>PR / MR decoration &amp; Quality Gate</span>
diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmIntegration-it.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmIntegration-it.tsx
index f044f926600..f82be896a34 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmIntegration-it.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmIntegration-it.tsx
@@ -24,8 +24,10 @@ import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
import AlmSettingsServiceMock from '../../../../../api/mocks/AlmSettingsServiceMock';
import SettingsServiceMock from '../../../../../api/mocks/SettingsServiceMock';
import { AvailableFeaturesContext } from '../../../../../app/components/available-features/AvailableFeaturesContext';
+import { getEdition } from '../../../../../helpers/editions';
import { renderComponent } from '../../../../../helpers/testReactTestingUtils';
import { AlmKeys } from '../../../../../types/alm-settings';
+import { EditionKey } from '../../../../../types/editions';
import { Feature } from '../../../../../types/features';
import { SettingsKey } from '../../../../../types/settings';
import AlmIntegration from '../AlmIntegration';
@@ -54,7 +56,7 @@ it('should not display the serverBaseURL message when it is defined', async () =
expect(ui.serverBaseUrlMissingInformation.query()).not.toBeInTheDocument();
});
-it('should not display the serverBaseURL message for Community edition', async () => {
+it(`should not display the serverBaseURL message for ${getEdition(EditionKey.community).name}`, async () => {
const { ui } = getPageObjects();
renderAlmIntegration();
expect(await ui.almHeading.find()).toBeInTheDocument();
diff --git a/server/sonar-web/src/main/js/components/tutorials/other/__tests__/DoneNextSteps-it.tsx b/server/sonar-web/src/main/js/components/tutorials/other/__tests__/DoneNextSteps-it.tsx
index 9edff911e5b..9993b87a169 100644
--- a/server/sonar-web/src/main/js/components/tutorials/other/__tests__/DoneNextSteps-it.tsx
+++ b/server/sonar-web/src/main/js/components/tutorials/other/__tests__/DoneNextSteps-it.tsx
@@ -19,6 +19,7 @@
*/
import { byRole, byText } from '~sonar-aligned/helpers/testSelector';
+import { getEdition } from '../../../../helpers/editions';
import { mockAppState } from '../../../../helpers/testMocks';
import { renderApp } from '../../../../helpers/testReactTestingUtils';
import { EditionKey } from '../../../../types/editions';
@@ -34,7 +35,7 @@ const ui = {
nextStepLinks: byRole('link'),
};
-describe('Community Edition', () => {
+describe(`${getEdition(EditionKey.community).name}`, () => {
it('should inform the user about available next steps', async () => {
renderDoneNextSteps();
diff --git a/server/sonar-web/src/main/js/helpers/editions.ts b/server/sonar-web/src/main/js/helpers/editions.ts
index aec5f2ca932..4509bb3913a 100644
--- a/server/sonar-web/src/main/js/helpers/editions.ts
+++ b/server/sonar-web/src/main/js/helpers/editions.ts
@@ -25,7 +25,7 @@ import { SystemUpgrade } from '../types/system';
const EDITIONS: { [x in EditionKey]: Edition } = {
community: {
key: EditionKey.community,
- name: 'Community Edition',
+ name: 'Community Build',
homeUrl: 'https://www.sonarsource.com/open-source-editions/',
downloadProperty: 'downloadUrl',
},