diff --git a/x-pack/plugins/uptime/public/components/common/charts/__tests__/__snapshots__/donut_chart.test.tsx.snap b/x-pack/plugins/uptime/public/components/common/charts/__tests__/__snapshots__/donut_chart.test.tsx.snap
index 1a18cf5651bee..21d65f63783c5 100644
--- a/x-pack/plugins/uptime/public/components/common/charts/__tests__/__snapshots__/donut_chart.test.tsx.snap
+++ b/x-pack/plugins/uptime/public/components/common/charts/__tests__/__snapshots__/donut_chart.test.tsx.snap
@@ -490,8 +490,9 @@ exports[`DonutChart component renders a donut chart 1`] = `
- Up
+ Down
- Down
+ Up
- Up
+ Down
- Down
+ Up
-
-
-
-
-`;
diff --git a/x-pack/plugins/uptime/public/components/common/charts/__tests__/__snapshots__/donut_chart_legend_row.test.tsx.snap b/x-pack/plugins/uptime/public/components/common/charts/__tests__/__snapshots__/donut_chart_legend_row.test.tsx.snap
index bc6033ea7109a..6e2a58cf528ed 100644
--- a/x-pack/plugins/uptime/public/components/common/charts/__tests__/__snapshots__/donut_chart_legend_row.test.tsx.snap
+++ b/x-pack/plugins/uptime/public/components/common/charts/__tests__/__snapshots__/donut_chart_legend_row.test.tsx.snap
@@ -15,6 +15,7 @@ exports[`DonutChartLegendRow passes appropriate props 1`] = `
Foo
diff --git a/x-pack/plugins/uptime/public/components/common/charts/__tests__/donut_chart_legend.test.tsx b/x-pack/plugins/uptime/public/components/common/charts/__tests__/donut_chart_legend.test.tsx
index 1b71b87884fb8..2ef02106e6e66 100644
--- a/x-pack/plugins/uptime/public/components/common/charts/__tests__/donut_chart_legend.test.tsx
+++ b/x-pack/plugins/uptime/public/components/common/charts/__tests__/donut_chart_legend.test.tsx
@@ -3,14 +3,30 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
+import React from 'react';
+import { renderWithIntl } from '@kbn/test/jest';
import { DonutChartLegend } from '../donut_chart_legend';
-import { shallowWithIntl } from '@kbn/test/jest';
-import React from 'react';
+
+import { STATUS_DOWN_LABEL, STATUS_UP_LABEL } from '../../translations';
describe('DonutChartLegend', () => {
it('applies valid props as expected', () => {
- const wrapper = shallowWithIntl();
- expect(wrapper).toMatchSnapshot();
+ const up = 45;
+ const down = 23;
+ const component = renderWithIntl();
+
+ expect(
+ component.find('[data-test-subj="xpack.uptime.snapshot.donutChart.up.label"]').text()
+ ).toBe(STATUS_UP_LABEL);
+ expect(component.find('[data-test-subj="xpack.uptime.snapshot.donutChart.up"]').text()).toBe(
+ `${up}`
+ );
+ expect(
+ component.find('[data-test-subj="xpack.uptime.snapshot.donutChart.down.label"]').text()
+ ).toBe(STATUS_DOWN_LABEL);
+ expect(component.find('[data-test-subj="xpack.uptime.snapshot.donutChart.down"]').text()).toBe(
+ `${down}`
+ );
});
});
diff --git a/x-pack/plugins/uptime/public/components/common/charts/donut_chart_legend.tsx b/x-pack/plugins/uptime/public/components/common/charts/donut_chart_legend.tsx
index f3b50895fff63..92b9c72e3f1e6 100644
--- a/x-pack/plugins/uptime/public/components/common/charts/donut_chart_legend.tsx
+++ b/x-pack/plugins/uptime/public/components/common/charts/donut_chart_legend.tsx
@@ -34,14 +34,14 @@ export const DonutChartLegend = ({ down, up }: Props) => {
diff --git a/x-pack/plugins/uptime/public/components/common/charts/donut_chart_legend_row.tsx b/x-pack/plugins/uptime/public/components/common/charts/donut_chart_legend_row.tsx
index fc67a86db3b48..0f637aff3bfa4 100644
--- a/x-pack/plugins/uptime/public/components/common/charts/donut_chart_legend_row.tsx
+++ b/x-pack/plugins/uptime/public/components/common/charts/donut_chart_legend_row.tsx
@@ -31,7 +31,7 @@ export const DonutChartLegendRow = ({ color, content, message, 'data-test-subj':
-
+
{message}