From 2452d6134d4cea6cecb243992941f3b89b41956a Mon Sep 17 00:00:00 2001 From: Devon Thomson Date: Fri, 13 Oct 2023 17:29:38 -0400 Subject: [PATCH] Re-word partial data message (#168883) Re-words the partial data message to remove the word "wrong". Co-authored-by: nreese (cherry picked from commit 1c2df62494c2710c96be487595350f73053d5600) --- src/plugins/data/public/search/search_service.test.ts | 2 +- .../data/public/search/warnings/extract_warnings.test.ts | 8 ++++---- .../data/public/search/warnings/extract_warnings.ts | 2 +- test/examples/search/warnings.ts | 4 ++-- .../functional/apps/discover/async_scripted_fields.js | 2 +- .../test_suites/common/examples/search/warnings.ts | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/plugins/data/public/search/search_service.test.ts b/src/plugins/data/public/search/search_service.test.ts index 5f9e57d05fe6b..69afad8d9b079 100644 --- a/src/plugins/data/public/search/search_service.test.ts +++ b/src/plugins/data/public/search/search_service.test.ts @@ -143,7 +143,7 @@ describe('Search service', () => { expect(notifications.toasts.addWarning).toBeCalledTimes(1); expect(notifications.toasts.addWarning).toBeCalledWith({ - title: 'The data might be incomplete or wrong.', + title: 'Results are partial and may be incomplete.', text: expect.any(Function), }); }); diff --git a/src/plugins/data/public/search/warnings/extract_warnings.test.ts b/src/plugins/data/public/search/warnings/extract_warnings.test.ts index 6a5fc046dc5d3..02e235d897dc7 100644 --- a/src/plugins/data/public/search/warnings/extract_warnings.test.ts +++ b/src/plugins/data/public/search/warnings/extract_warnings.test.ts @@ -43,7 +43,7 @@ describe('extract search response warnings', () => { expect(extractWarnings(response, mockInspectorService)).toEqual([ { type: 'incomplete', - message: 'The data might be incomplete or wrong.', + message: 'Results are partial and may be incomplete.', clusters: { '(local)': { status: 'partial', @@ -69,7 +69,7 @@ describe('extract search response warnings', () => { expect(extractWarnings(response, mockInspectorService)).toEqual([ { type: 'incomplete', - message: 'The data might be incomplete or wrong.', + message: 'Results are partial and may be incomplete.', clusters: { '(local)': { status: 'partial', @@ -188,7 +188,7 @@ describe('extract search response warnings', () => { expect(extractWarnings(response, mockInspectorService)).toEqual([ { type: 'incomplete', - message: 'The data might be incomplete or wrong.', + message: 'Results are partial and may be incomplete.', clusters: response._clusters.details, openInInspector: expect.any(Function), }, @@ -242,7 +242,7 @@ describe('extract search response warnings', () => { expect(extractWarnings(response, mockInspectorService)).toEqual([ { type: 'incomplete', - message: 'The data might be incomplete or wrong.', + message: 'Results are partial and may be incomplete.', clusters: response._clusters.details, openInInspector: expect.any(Function), }, diff --git a/src/plugins/data/public/search/warnings/extract_warnings.ts b/src/plugins/data/public/search/warnings/extract_warnings.ts index 2a6a9df484036..15b77dd5d0248 100644 --- a/src/plugins/data/public/search/warnings/extract_warnings.ts +++ b/src/plugins/data/public/search/warnings/extract_warnings.ts @@ -37,7 +37,7 @@ export function extractWarnings( warnings.push({ type: 'incomplete', message: i18n.translate('data.search.searchSource.fetch.incompleteResultsMessage', { - defaultMessage: 'The data might be incomplete or wrong.', + defaultMessage: 'Results are partial and may be incomplete.', }), clusters: rawResponse._clusters ? ( diff --git a/test/examples/search/warnings.ts b/test/examples/search/warnings.ts index b8fcd5d63564b..267a49de08bc7 100644 --- a/test/examples/search/warnings.ts +++ b/test/examples/search/warnings.ts @@ -107,7 +107,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await retry.try(async () => { const toasts = await find.allByCssSelector(toastsSelector); expect(toasts.length).to.be(2); - const expects = ['The data might be incomplete or wrong.', 'Query result']; + const expects = ['Results are partial and may be incomplete.', 'Query result']; await asyncForEach(toasts, async (t, index) => { expect(await t.getVisibleText()).to.eql(expects[index]); }); @@ -164,7 +164,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await retry.try(async () => { toasts = await find.allByCssSelector(toastsSelector); expect(toasts.length).to.be(2); - const expects = ['The data might be incomplete or wrong.', 'Query result']; + const expects = ['Results are partial and may be incomplete.', 'Query result']; await asyncForEach(toasts, async (t, index) => { expect(await t.getVisibleText()).to.eql(expects[index]); }); diff --git a/x-pack/test/functional/apps/discover/async_scripted_fields.js b/x-pack/test/functional/apps/discover/async_scripted_fields.js index f5143e5fcc084..5810830aec3a6 100644 --- a/x-pack/test/functional/apps/discover/async_scripted_fields.js +++ b/x-pack/test/functional/apps/discover/async_scripted_fields.js @@ -81,7 +81,7 @@ export default function ({ getService, getPageObjects }) { 'dscNoResultsInterceptedWarningsCallout_warningTitle' ); log.debug(shardMessage); - expect(shardMessage).to.be('The data might be incomplete or wrong.'); + expect(shardMessage).to.be('Results are partial and may be incomplete.'); }); }); diff --git a/x-pack/test_serverless/functional/test_suites/common/examples/search/warnings.ts b/x-pack/test_serverless/functional/test_suites/common/examples/search/warnings.ts index 694d1ed335c22..ff24321f11348 100644 --- a/x-pack/test_serverless/functional/test_suites/common/examples/search/warnings.ts +++ b/x-pack/test_serverless/functional/test_suites/common/examples/search/warnings.ts @@ -107,7 +107,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await retry.try(async () => { const toasts = await find.allByCssSelector(toastsSelector); expect(toasts.length).to.be(2); - const expects = ['The data might be incomplete or wrong.', 'Query result']; + const expects = ['Results are partial and may be incomplete.', 'Query result']; await asyncForEach(toasts, async (t, index) => { expect(await t.getVisibleText()).to.eql(expects[index]); }); @@ -164,7 +164,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await retry.try(async () => { toasts = await find.allByCssSelector(toastsSelector); expect(toasts.length).to.be(2); - const expects = ['The data might be incomplete or wrong.', 'Query result']; + const expects = ['Results are partial and may be incomplete.', 'Query result']; await asyncForEach(toasts, async (t, index) => { expect(await t.getVisibleText()).to.eql(expects[index]); });