Skip to content

Commit

Permalink
Re-word partial data message (#168883)
Browse files Browse the repository at this point in the history
Re-words the partial data message to remove the word "wrong".

Co-authored-by: nreese <reese.nathan@elastic.co>
(cherry picked from commit 1c2df62)
  • Loading branch information
ThomThomson committed Oct 13, 2023
1 parent 57e5859 commit 2452d61
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/plugins/data/public/search/search_service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand Down Expand Up @@ -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),
},
Expand Down Expand Up @@ -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),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
? (
Expand Down
4 changes: 2 additions & 2 deletions test/examples/search/warnings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
});
Expand Down Expand Up @@ -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]);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
});
Expand Down Expand Up @@ -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]);
});
Expand Down

0 comments on commit 2452d61

Please sign in to comment.