Skip to content

Commit 8a0b595

Browse files
committed
Update tests
1 parent 3f8bfd6 commit 8a0b595

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

  • x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/severity/common

x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/severity/common/index.test.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import { EuiHealth, useEuiTheme } from '@elastic/eui';
1616

1717
import { RiskSeverity } from '../../../../../common/search_strategy';
1818
import { RiskScoreLevel } from '.';
19-
import { SEVERITY_COLOR } from '../../../../overview/components/detection_response/utils';
2019

2120
jest.mock('@elastic/eui', () => {
2221
const original = jest.requireActual('@elastic/eui');
@@ -37,7 +36,7 @@ describe('RiskScore', () => {
3736

3837
expect(container).toHaveTextContent(RiskSeverity.Critical);
3938
expect(EuiHealth as jest.Mock).toHaveBeenLastCalledWith(
40-
expect.objectContaining({ color: SEVERITY_COLOR.critical }),
39+
expect.objectContaining({ color: euiThemeVars.euiColorSeverityDanger }),
4140
{}
4241
);
4342
});
@@ -52,7 +51,7 @@ describe('RiskScore', () => {
5251
expect(container).toHaveTextContent(RiskSeverity.High);
5352

5453
expect(EuiHealth as jest.Mock).toHaveBeenLastCalledWith(
55-
expect.objectContaining({ color: SEVERITY_COLOR.high }),
54+
expect.objectContaining({ color: euiThemeVars.euiColorSeverityRisk }),
5655
context
5756
);
5857
});
@@ -67,7 +66,7 @@ describe('RiskScore', () => {
6766
expect(container).toHaveTextContent(RiskSeverity.Moderate);
6867

6968
expect(EuiHealth as jest.Mock).toHaveBeenLastCalledWith(
70-
expect.objectContaining({ color: SEVERITY_COLOR.medium }),
69+
expect.objectContaining({ color: euiThemeVars.euiColorSeverityWarning }),
7170
context
7271
);
7372
});
@@ -82,7 +81,7 @@ describe('RiskScore', () => {
8281
expect(container).toHaveTextContent(RiskSeverity.Low);
8382

8483
expect(EuiHealth as jest.Mock).toHaveBeenLastCalledWith(
85-
expect.objectContaining({ color: SEVERITY_COLOR.low }),
84+
expect.objectContaining({ color: euiThemeVars.euiColorSeverityNeutral }),
8685
context
8786
);
8887
});

0 commit comments

Comments
 (0)