aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main
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 /server/sonar-web/src/main
parenta78423a63dd2c279ca7c80dfbbb75f616d3bc5d7 (diff)
downloadsonarqube-81516c0b3c97ab54d9d926f059b050259febe997.tar.gz
sonarqube-81516c0b3c97ab54d9d926f059b050259febe997.zip
Fixes from review
Diffstat (limited to 'server/sonar-web/src/main')
-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
4 files changed, 9 insertions, 9 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);