From 0ea6b82c012c53262e255fb02e8a9a9a3c0f22e5 Mon Sep 17 00:00:00 2001 From: Mikita Kavaliou Date: Wed, 30 Oct 2024 16:22:18 +0100 Subject: [PATCH] fix(classification): Code review changes --- .../security-controls/__tests__/SecurityControls.test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/features/classification/security-controls/__tests__/SecurityControls.test.js b/src/features/classification/security-controls/__tests__/SecurityControls.test.js index b76a0cb8e0..29a479e78e 100644 --- a/src/features/classification/security-controls/__tests__/SecurityControls.test.js +++ b/src/features/classification/security-controls/__tests__/SecurityControls.test.js @@ -47,8 +47,8 @@ describe('features/classification/security-controls/SecurityControls', () => { test('should render SecurityControls with Integration label when using SHORT controlsFormat and shouldDisplayAppsAsIntegrations is true', () => { wrapper.setProps({ controlsFormat: SHORT, shouldDisplayAppsAsIntegrations: true }); - expect(wrapper.find('SecurityControlsItem').prop('message').id).toBe( - messages.shortSharingDownloadIntegration.id, + expect(wrapper.find('SecurityControlsItem').prop('message').defaultMessage).toBe( + 'Sharing, download and integration restrictions apply', ); }); @@ -74,7 +74,7 @@ describe('features/classification/security-controls/SecurityControls', () => { wrapper .find('SecurityControlsModal') .prop('modalItems') - .find(item => item.message.id === messages.integrationDownloadAllowlist.id), + .find(item => item.message.defaultMessage === 'Only select integrations are allowed: {appNames}'), ).toBeDefined(); }); @@ -89,7 +89,7 @@ describe('features/classification/security-controls/SecurityControls', () => { wrapper.findWhere( node => node.type() === 'SecurityControlsItem' && - node.prop('message').id === messages.integrationDownloadAllowlist.id, + node.prop('message').defaultMessage === 'Only select integrations are allowed: {appNames}', ), ).toBeDefined(); });