From 5138bab252480c44648d2952e2ddbc0a9346a405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=CC=81bastien=20Loix?= Date: Thu, 4 Jun 2020 20:26:06 +0200 Subject: [PATCH] Fix component integration test --- .../client_integration/home/index_templates_tab.test.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/index_management/__jest__/client_integration/home/index_templates_tab.test.ts b/x-pack/plugins/index_management/__jest__/client_integration/home/index_templates_tab.test.ts index 81d5d82a45661..8f6a8dddeb195 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/home/index_templates_tab.test.ts +++ b/x-pack/plugins/index_management/__jest__/client_integration/home/index_templates_tab.test.ts @@ -14,10 +14,12 @@ import { IndexTemplatesTabTestBed, setup } from './index_templates_tab.helpers'; const removeWhiteSpaceOnArrayValues = (array: any[]) => array.map((value) => { - if (!value.trim) { + if (typeof value !== 'string') { return value; } - return value.trim(); + + // Convert non breaking spaces ( ) to ordinary space + return value.trim().replace(/\s/g, ' '); }); describe('Index Templates tab', () => { @@ -148,7 +150,7 @@ describe('Index Templates tab', () => { ilmPolicyName, composedOfString, priorityFormatted, - 'MSA', // Mappings Settings Aliases badges + 'M S A', // Mappings Settings Aliases badges ]); });