Skip to content

Commit 082770a

Browse files
authored
fix: Flake rate to fixed decimals (#3489)
1 parent 4980a6f commit 082770a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/pages/RepoPage/FailedTestsTab/FailedTestsPage/MetricsSection/MetricsSection.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const mockFlakeAggResponse = {
4848
flakeAggregates: {
4949
flakeCount: 88,
5050
flakeCountPercentChange: 10.0,
51-
flakeRate: 8,
51+
flakeRate: 8.412412312,
5252
flakeRatePercentChange: 5.0,
5353
},
5454
},
@@ -291,7 +291,7 @@ describe('MetricsSection', () => {
291291
})
292292

293293
const title = await screen.findByText('Avg. flake rate')
294-
const context = await screen.findByText('8%')
294+
const context = await screen.findByText('8.41%')
295295
const description = await screen.findByText(
296296
'The average flake rate across all branches.'
297297
)

src/pages/RepoPage/FailedTestsTab/FailedTestsPage/MetricsSection/MetricsSection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ const AverageFlakeRateCard = ({
220220
</MetricCard.Title>
221221
</MetricCard.Header>
222222
<MetricCard.Content>
223-
{flakeRate}%
223+
{flakeRate?.toFixed(2)}%
224224
{flakeRatePercentChange ? (
225225
<PercentBadge value={flakeRatePercentChange} />
226226
) : null}

0 commit comments

Comments
 (0)