From bfd7d5f753c00460218cfad7e552c0bf645419f3 Mon Sep 17 00:00:00 2001 From: Brianna Hall Date: Mon, 4 Oct 2021 13:11:38 -0400 Subject: [PATCH] Start resolving test case errors --- .../public/i18n/__snapshots__/i18n_service.test.tsx.snap | 6 ++++-- src/core/public/i18n/i18n_eui_mapping.tsx | 6 ++---- .../public/components/cron_editor/cron_editor.test.tsx | 6 ------ .../__jest__/client_integration/helpers/jest.mocks.tsx | 6 ------ .../field_format_editor/editors/url/url.test.tsx | 6 ------ .../app/error_group_overview/List/List.test.tsx | 6 ------ .../components/shared/Stacktrace/Stackframe.test.tsx | 6 ------ .../__snapshots__/asset_manager.stories.storyshot | 8 ++++---- .../__snapshots__/expression_input.stories.storyshot | 2 +- .../__snapshots__/file_upload.stories.storyshot | 4 ++-- .../__snapshots__/workpad_table.stories.storyshot | 8 ++++---- .../components/footer/settings/settings.test.tsx | 6 +----- x-pack/plugins/canvas/storybook/storyshots.test.tsx | 7 ------- .../license_management/__jest__/add_license.test.js | 5 ----- .../__jest__/request_trial_extension.test.js | 5 ----- .../license_management/__jest__/revert_to_basic.test.js | 5 ----- .../license_management/__jest__/start_trial.test.js | 6 ------ .../reporting/public/management/report_listing.test.tsx | 6 ------ .../availability_reporting.test.tsx | 6 ------ .../availability_reporting/location_status_tags.test.tsx | 6 ------ .../overview/monitor_list/monitor_list.test.tsx | 6 ------ 21 files changed, 18 insertions(+), 104 deletions(-) diff --git a/src/core/public/i18n/__snapshots__/i18n_service.test.tsx.snap b/src/core/public/i18n/__snapshots__/i18n_service.test.tsx.snap index 54e223cdc5d4127..741575db872916a 100644 --- a/src/core/public/i18n/__snapshots__/i18n_service.test.tsx.snap +++ b/src/core/public/i18n/__snapshots__/i18n_service.test.tsx.snap @@ -120,13 +120,15 @@ exports[`#start() returns \`Context\` component 1`] = ` "euiLink.external.ariaLabel": "External link", "euiLink.newTarget.screenReaderOnlyText": "(opens in a new tab or window)", "euiMarkdownEditorFooter.closeButton": "Close", - "euiMarkdownEditorFooter.descriptionPrefix": "This editor uses", - "euiMarkdownEditorFooter.descriptionSuffix": "You can also utilize these additional syntax plugins to add rich content to your text.", "euiMarkdownEditorFooter.errorsTitle": "Errors", + "euiMarkdownEditorFooter.mdSyntaxLink": "GitHub flavored markdown", "euiMarkdownEditorFooter.openUploadModal": "Open upload files modal", "euiMarkdownEditorFooter.showMarkdownHelp": "Show markdown help", "euiMarkdownEditorFooter.showSyntaxErrors": "Show errors", "euiMarkdownEditorFooter.supportedFileTypes": [Function], + "euiMarkdownEditorFooter.syntaxModalDescriptionPrefix": "This editor uses", + "euiMarkdownEditorFooter.syntaxModalDescriptionSuffix": "You can also utilize these additional syntax plugins to add rich content to your text.", + "euiMarkdownEditorFooter.syntaxPopoverDescription": "This editor uses", "euiMarkdownEditorFooter.syntaxTitle": "Syntax help", "euiMarkdownEditorFooter.unsupportedFileType": "File type not supported", "euiMarkdownEditorFooter.uploadingFiles": "Click to upload files", diff --git a/src/core/public/i18n/i18n_eui_mapping.tsx b/src/core/public/i18n/i18n_eui_mapping.tsx index 50753bc98260a78..b7bacb3679058c7 100644 --- a/src/core/public/i18n/i18n_eui_mapping.tsx +++ b/src/core/public/i18n/i18n_eui_mapping.tsx @@ -643,15 +643,13 @@ export const getEuiContextMapping = (): EuiTokensObject => { 'euiMarkdownEditorFooter.syntaxModalDescriptionPrefix': i18n.translate( 'core.euiMarkdownEditorFooter.syntaxModalDescriptionPrefix', { - defaultMessage: - 'This editor uses', + defaultMessage: 'This editor uses', } ), 'euiMarkdownEditorFooter.syntaxModalDescriptionSuffix': i18n.translate( 'core.euiMarkdownEditorFooter.syntaxModalDescriptionSuffix', { - defaultMessage: - 'You can also utilize these additional syntax plugins to add rich content to your text.', + defaultMessage: 'You can also utilize these additional syntax plugins to add rich content to your text.', } ), 'euiMarkdownEditorFooter.syntaxPopoverDescription': i18n.translate( diff --git a/src/plugins/es_ui_shared/public/components/cron_editor/cron_editor.test.tsx b/src/plugins/es_ui_shared/public/components/cron_editor/cron_editor.test.tsx index 26ef7483bbbbd99..0ae82872124a433 100644 --- a/src/plugins/es_ui_shared/public/components/cron_editor/cron_editor.test.tsx +++ b/src/plugins/es_ui_shared/public/components/cron_editor/cron_editor.test.tsx @@ -14,12 +14,6 @@ import { mountWithI18nProvider } from '@kbn/test/jest'; import { Frequency } from './types'; import { CronEditor } from './cron_editor'; -jest.mock('@elastic/eui/lib/services/accessibility/html_id_generator', () => { - return { - htmlIdGenerator: () => () => `generated-id`, - }; -}); - describe('CronEditor', () => { ['MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'YEAR'].forEach((unit) => { test(`is rendered with a ${unit} frequency`, () => { diff --git a/src/plugins/index_pattern_field_editor/__jest__/client_integration/helpers/jest.mocks.tsx b/src/plugins/index_pattern_field_editor/__jest__/client_integration/helpers/jest.mocks.tsx index e291ec7b4ca0831..d33a0d2a87fb5de 100644 --- a/src/plugins/index_pattern_field_editor/__jest__/client_integration/helpers/jest.mocks.tsx +++ b/src/plugins/index_pattern_field_editor/__jest__/client_integration/helpers/jest.mocks.tsx @@ -9,12 +9,6 @@ import React from 'react'; const EDITOR_ID = 'testEditor'; -jest.mock('@elastic/eui/lib/services/accessibility', () => { - return { - htmlIdGenerator: () => () => `generated-id`, - }; -}); - jest.mock('@elastic/eui', () => { const original = jest.requireActual('@elastic/eui'); diff --git a/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/url/url.test.tsx b/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/url/url.test.tsx index 48d3a5dfea7c65a..6394d42b691f1fe 100644 --- a/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/url/url.test.tsx +++ b/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/url/url.test.tsx @@ -15,12 +15,6 @@ import { createKibanaReactContext } from '../../../../../../kibana_react/public' import { render } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -jest.mock('@elastic/eui/lib/services/accessibility', () => { - return { - htmlIdGenerator: () => () => `generated-id`, - }; -}); - const fieldType = 'string'; const format = { getConverterFor: jest diff --git a/x-pack/plugins/apm/public/components/app/error_group_overview/List/List.test.tsx b/x-pack/plugins/apm/public/components/app/error_group_overview/List/List.test.tsx index a2a92b7e16f8eac..12fa1c955ccc8fb 100644 --- a/x-pack/plugins/apm/public/components/app/error_group_overview/List/List.test.tsx +++ b/x-pack/plugins/apm/public/components/app/error_group_overview/List/List.test.tsx @@ -15,12 +15,6 @@ import props from './__fixtures__/props.json'; import { MemoryRouter } from 'react-router-dom'; import { EuiThemeProvider } from '../../../../../../../../src/plugins/kibana_react/common'; -jest.mock('@elastic/eui/lib/services/accessibility/html_id_generator', () => { - return { - htmlIdGenerator: () => () => `generated-id`, - }; -}); - describe('ErrorGroupOverview -> List', () => { beforeAll(() => { mockMoment(); diff --git a/x-pack/plugins/apm/public/components/shared/Stacktrace/Stackframe.test.tsx b/x-pack/plugins/apm/public/components/shared/Stacktrace/Stackframe.test.tsx index c73d312e0cf1890..6bab77dbe49701b 100644 --- a/x-pack/plugins/apm/public/components/shared/Stacktrace/Stackframe.test.tsx +++ b/x-pack/plugins/apm/public/components/shared/Stacktrace/Stackframe.test.tsx @@ -12,12 +12,6 @@ import { mountWithTheme } from '../../../utils/testHelpers'; import { Stackframe as StackframeComponent } from './Stackframe'; import stacktracesMock from './__fixtures__/stacktraces.json'; -jest.mock('@elastic/eui/lib/services/accessibility/html_id_generator', () => { - return { - htmlIdGenerator: () => () => `generated-id`, - }; -}); - describe('Stackframe', () => { describe('when stackframe has source lines', () => { let wrapper: ReactWrapper; diff --git a/x-pack/plugins/canvas/public/components/asset_manager/__stories__/__snapshots__/asset_manager.stories.storyshot b/x-pack/plugins/canvas/public/components/asset_manager/__stories__/__snapshots__/asset_manager.stories.storyshot index 6ef6d19e446dbc2..45b9d896db5f270 100644 --- a/x-pack/plugins/canvas/public/components/asset_manager/__stories__/__snapshots__/asset_manager.stories.storyshot +++ b/x-pack/plugins/canvas/public/components/asset_manager/__stories__/__snapshots__/asset_manager.stories.storyshot @@ -54,7 +54,7 @@ exports[`Storyshots components/Assets/AssetManager no assets 1`] = ` >