Skip to content

Commit

Permalink
EPMDJ-3124: support latest API changes, rename ratio to percentage
Browse files Browse the repository at this point in the history
Issue: EPMDJ-3124
  • Loading branch information
pavyarov authored and pavyarov committed Sep 9, 2020
1 parent 57bd223 commit 188f13a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const FinishRecording = finishRecording(({ className }: Props) => {
const { testName = '', timerStart = 0, drillAdminUrl = '' } = useAgentConfig() || {};
const {
coverage: {
ratio = 0,
percentage = 0,
riskCount: { covered: risksCovered = 0 } = {},
methodCount: { covered: methodCount = 0 } = {},
} = {},
Expand All @@ -39,7 +39,7 @@ export const FinishRecording = finishRecording(({ className }: Props) => {
<Title>Testing finished</Title>
<TestResultsPanel>
<TestResult label="Test time" value={`${hours}:${minutes}:${seconds}`} />
<TestResult label="Code coverage" value={`${percentFormatter(ratio)}%`} />
<TestResult label="Code coverage" value={`${percentFormatter(percentage)}%`} />
<TestResult label="Risks methods covered" value={risksCovered} />
<TestResult label="Total methods covered" value={methodCount} />
</TestResultsPanel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const InProgress = inProgress(({ className }: Props) => {
<>
<ResultsLabel>Active scope statistics</ResultsLabel>
<TestResultsPanel>
<TestResult label="Scope coverage" value={`${percentFormatter(scope?.coverage?.ratio || 0)}%`} color="blue" />
<TestResult label="Scope coverage" value={`${percentFormatter(scope?.coverage?.percentage || 0)}%`} color="blue" />
<TestResult label="Risks methods covered" value={scope?.coverage?.riskCount?.covered} color="red" />
<TestResult label="Total methods covered" value={scope?.coverage?.methodCount?.covered} color="blue" />
</TestResultsPanel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const buildStatistics = BEM(styles);
export const BuildStatistics = buildStatistics(({ className }: Props) => {
const config = useAgentConfig() || {};
const {
ratio = 0,
percentage = 0,
methodCount: { total: totalMethodCount = 0, covered: coveredMethodCount = 0 } = {},
riskCount: { total: totalRiskCount = 0, covered: coveredRiskCount = 0 } = {},
}: any = useBuildCoverage(config.drillAdminUrl) || {};
Expand All @@ -27,7 +27,7 @@ export const BuildStatistics = buildStatistics(({ className }: Props) => {
<Panel align="space-between">
<Label>Code coverage</Label>
<Value>
{percentFormatter(ratio)}
{percentFormatter(percentage)}
%
</Value>
</Panel>
Expand Down

0 comments on commit 188f13a

Please sign in to comment.