aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Davis <jeremy.davis@sonarsource.com>2019-09-24 11:03:48 +0200
committerSonarTech <sonartech@sonarsource.com>2019-09-24 20:21:18 +0200
commit81516c0b3c97ab54d9d926f059b050259febe997 (patch)
tree24567c5eeb058d8c95d5b8de2f3a51679754a924
parenta78423a63dd2c279ca7c80dfbbb75f616d3bc5d7 (diff)
downloadsonarqube-81516c0b3c97ab54d9d926f059b050259febe997.tar.gz
sonarqube-81516c0b3c97ab54d9d926f059b050259febe997.zip
Fixes from review
-rw-r--r--server/sonar-web/src/main/js/apps/projectBaseline/__tests__/__snapshots__/BranchList-test.tsx.snap4
-rw-r--r--server/sonar-web/src/main/js/apps/projectBaseline/components/BranchList.tsx4
-rw-r--r--server/sonar-web/src/main/js/helpers/__tests__/periods-test.ts8
-rw-r--r--server/sonar-web/src/main/js/helpers/periods.ts2
-rw-r--r--sonar-core/src/main/resources/org/sonar/l10n/core.properties8
5 files changed, 13 insertions, 13 deletions
diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/__tests__/__snapshots__/BranchList-test.tsx.snap b/server/sonar-web/src/main/js/apps/projectBaseline/__tests__/__snapshots__/BranchList-test.tsx.snap
index 8d070004181..12ab71b6a45 100644
--- a/server/sonar-web/src/main/js/apps/projectBaseline/__tests__/__snapshots__/BranchList-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/projectBaseline/__tests__/__snapshots__/BranchList-test.tsx.snap
@@ -11,14 +11,14 @@ exports[`should render correctly 1`] = `
branch_list.branch
</th>
<th
- className="thin nowrap huge-spacer-right"
+ className="nowrap huge-spacer-right"
>
branch_list.current_setting
</th>
<th
className="thin nowrap"
>
- branch_list.edit_settings
+ branch_list.actions
</th>
</tr>
</thead>
diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/components/BranchList.tsx b/server/sonar-web/src/main/js/apps/projectBaseline/components/BranchList.tsx
index 95ad1db5475..d907968a407 100644
--- a/server/sonar-web/src/main/js/apps/projectBaseline/components/BranchList.tsx
+++ b/server/sonar-web/src/main/js/apps/projectBaseline/components/BranchList.tsx
@@ -168,10 +168,10 @@ export default class BranchList extends React.PureComponent<Props, State> {
<thead>
<tr>
<th>{translate('branch_list.branch')}</th>
- <th className="thin nowrap huge-spacer-right">
+ <th className="nowrap huge-spacer-right">
{translate('branch_list.current_setting')}
</th>
- <th className="thin nowrap">{translate('branch_list.edit_settings')}</th>
+ <th className="thin nowrap">{translate('branch_list.actions')}</th>
</tr>
</thead>
<tbody>
diff --git a/server/sonar-web/src/main/js/helpers/__tests__/periods-test.ts b/server/sonar-web/src/main/js/helpers/__tests__/periods-test.ts
index 53689b77ce4..0bebbf61018 100644
--- a/server/sonar-web/src/main/js/helpers/__tests__/periods-test.ts
+++ b/server/sonar-web/src/main/js/helpers/__tests__/periods-test.ts
@@ -85,17 +85,17 @@ describe('getPeriodLabel', () => {
it('should handle SPECIFIC_ANALYSIS', () => {
expect(
- getPeriodLabel(mockPeriod({ mode: 'SPECIFIC_ANALYSIS', modeParam: 'A658678DE' }), formatter)
- ).toBe('overview.period.specific_analysis.A658678DE');
+ getPeriodLabel(mockPeriod({ mode: 'SPECIFIC_ANALYSIS', parameter: '7.1' }), formatter)
+ ).toBe('overview.period.specific_analysis.2019-04-23T02:12:32+0100');
expect(getPeriodLabel(mockPeriod({ mode: 'SPECIFIC_ANALYSIS' }), formatter)).toBe(
'overview.period.specific_analysis.2019-04-23T02:12:32+0100'
);
- expect(formatter).toBeCalledTimes(1);
+ expect(formatter).toBeCalledTimes(2);
});
it('should handle PREVIOUS_VERSION', () => {
expect(
- getPeriodLabel(mockPeriod({ mode: 'PREVIOUS_VERSION', parameter: 'A658678DE' }), formatter)
+ getPeriodLabel(mockPeriod({ mode: 'PREVIOUS_VERSION', modeParam: 'A658678DE' }), formatter)
).toBe('overview.period.previous_version.A658678DE');
expect(getPeriodLabel(mockPeriod({ mode: 'PREVIOUS_VERSION' }), formatter)).toBe(
'overview.period.previous_version.2019-04-23T02:12:32+0100'
diff --git a/server/sonar-web/src/main/js/helpers/periods.ts b/server/sonar-web/src/main/js/helpers/periods.ts
index b2442175b78..6a9702fec7b 100644
--- a/server/sonar-web/src/main/js/helpers/periods.ts
+++ b/server/sonar-web/src/main/js/helpers/periods.ts
@@ -43,7 +43,7 @@ export function getPeriodLabel(
switch (period.mode) {
case 'SPECIFIC_ANALYSIS':
- parameter = parameter || dateFormatter(period.date);
+ parameter = dateFormatter(period.date);
break;
case 'PREVIOUS_VERSION':
parameter = parameter || dateFormatter(period.date);
diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties
index c12ed32138e..707315c440f 100644
--- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties
+++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties
@@ -551,7 +551,7 @@ project_baseline.configure_branches=Set a specific setting for a branch
baseline.previous_version=Previous version
baseline.previous_version.description=The New Code Period will begin with the analysis following the previous version.
baseline.number_days=Number of days
-baseline.number_days.description=Specify a number of days to set a floating New Code Period window.
+baseline.number_days.description=A floating New Code Period window set to a specific number of days.
baseline.specific_date=Specific date
baseline.specific_date.description=Set a specific date as the start of the New Code Period. (First analysis on this date will be used)
baseline.specific_analysis=Specific analysis
@@ -562,9 +562,9 @@ baseline.last_analysis_before=Last analysis before
baseline.next_analysis_notice=Changes will take effect after the next analysis
branch_list.branch=Branch
-branch_list.current_setting=Current setting
+branch_list.current_setting=Setting
branch_list.current_baseline=Current Baseline
-branch_list.edit_settings=Edit settings
+branch_list.actions=Actions
branch_list.default_setting=Project setting
baseline.new_code_period_for_branch_x=New Code Period for {0}
@@ -2565,7 +2565,7 @@ overview.period.manual_baseline=since {0}
# New periods (MMF-1579)
overview.period.number_of_days=from last {0} days
-overview.period.specific_analysis=since analysis on {0}
+overview.period.specific_analysis=since {0}
overview.gate.ERROR=Failed
overview.gate.WARN=Warning