@@ -96,7 +96,9 @@ export default class DomainFacet extends React.PureComponent<Props> { | |||
typeof item === 'string' ? ( | |||
<span className="facet search-navigator-facet facet-category" key={item}> | |||
<span className="facet-name"> | |||
{translate('component_measures.facet_category', item)} | |||
{!this.props.hasOverview && item === 'overall_category' | |||
? translate('component_measures.facet_category', item, 'estimated') | |||
: translate('component_measures.facet_category', item)} | |||
</span> | |||
</span> | |||
) : ( |
@@ -82,6 +82,11 @@ it('should render without overview', () => { | |||
).toBe(false); | |||
}); | |||
it('should use "estimated" label for overall measures ', () => { | |||
const wrapper = shallow(<DomainFacet {...PROPS} hasOverview={false} />); | |||
expect(wrapper.find('.facet-name').map(w => w.text())).toMatchSnapshot(); | |||
}); | |||
it('should not display subtitles of new measures if there is none', () => { | |||
const domain = { | |||
name: 'Reliability', |
@@ -441,3 +441,10 @@ exports[`should not display subtitles of new measures if there is none, even on | |||
</FacetItemsList> | |||
</FacetBox> | |||
`; | |||
exports[`should use "estimated" label for overall measures 1`] = ` | |||
Array [ | |||
"component_measures.facet_category.new_code_category", | |||
"component_measures.facet_category.overall_category.estimated", | |||
] | |||
`; |
@@ -163,6 +163,7 @@ export function hasFullMeasures(branch?: BranchLike) { | |||
export function getMeasuresPageMetricKeys(metrics: { [key: string]: Metric }, branch?: BranchLike) { | |||
if (!hasFullMeasures(branch)) { | |||
return [ | |||
'coverage', | |||
'new_coverage', | |||
'new_lines_to_cover', | |||
'new_uncovered_lines', |
@@ -2569,6 +2569,7 @@ component_measures.domain_facets.Complexity.help=How simple or complicated the c | |||
component_measures.facet_category.new_code_category=On new code | |||
component_measures.facet_category.overall_category=Overall | |||
component_measures.facet_category.overall_category.estimated=Estimated after merge | |||
component_measures.facet_category.tests_category=Tests | |||
component_measures.bubble_chart.zoom_level=Current zoom level. Scroll on the chart to zoom or unzoom, click here to reset. | |||