From 98712d8e586417da4e046531a0bb82d006b83b40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Efe=20G=C3=BCrkan=20YALAMAN?= Date: Wed, 22 Apr 2026 13:20:22 +0200 Subject: [PATCH] Add data-test-subj eslint check for content_connectors and search_inference_endpoints --- .eslintrc.js | 6 +++++- .../components/generated_config_fields.tsx | 2 ++ .../components/connector_detail/connector_stats.tsx | 7 +++++++ .../public/components/connector_detail/overview.tsx | 1 + .../public/components/connectors/connectors_table.tsx | 1 + .../connector/connector_overview_panels.tsx | 1 + .../connector/sync_rules/connector_sync_form.tsx | 2 ++ .../sync_rules/editable_basic_rules_table.tsx | 11 ++++++++++- .../connector/sync_rules/sync_rules_callouts.tsx | 4 ++++ .../connector_view_search_indices_details.tsx | 1 + .../page_introduction/page_introduction.test.tsx | 10 +++++++--- .../tables/inline_editable_table/action_column.tsx | 7 ++++++- .../components/elastic_inference_service/header.tsx | 1 + .../model_detail_flyout/add_endpoint_modal.tsx | 3 +++ .../model_detail_flyout/model_detail_flyout.tsx | 7 ++++++- .../model_detail_flyout/model_endpoint_row.tsx | 3 +++ 16 files changed, 60 insertions(+), 7 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 46795c0bf4d83..4fd4a7e23c819 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1148,7 +1148,11 @@ module.exports = { }, }, { - files: ['x-pack/solutions/search/**/*.tsx'], + files: [ + 'x-pack/solutions/search/**/*.tsx', + 'x-pack/platform/plugins/shared/content_connectors/**/*.{ts,tsx}', + 'x-pack/platform/plugins/shared/search_inference_endpoints/**/*.{ts,tsx}', + ], rules: { '@kbn/telemetry/event_generating_elements_should_be_instrumented': 'warn', }, diff --git a/x-pack/platform/plugins/shared/content_connectors/public/components/connector_detail/components/generated_config_fields.tsx b/x-pack/platform/plugins/shared/content_connectors/public/components/connector_detail/components/generated_config_fields.tsx index 08d8e97e61a50..56d1bf5b361cd 100644 --- a/x-pack/platform/plugins/shared/content_connectors/public/components/connector_detail/components/generated_config_fields.tsx +++ b/x-pack/platform/plugins/shared/content_connectors/public/components/connector_detail/components/generated_config_fields.tsx @@ -153,6 +153,7 @@ export const GeneratedConfigFields: React.FC = ({ = ({ > = ({ connector.status ) && connector.index_name ? ( = ({ ) : ( = ({ = ({ = ({ = ({ {agentlessAgentExists && ( = ({ {agnetlessPolicyExists ? ( { = ({ ), render: (connector: ConnectorViewItem) => ( {connector.name} diff --git a/x-pack/platform/plugins/shared/content_connectors/public/components/search_index/connector/connector_overview_panels.tsx b/x-pack/platform/plugins/shared/content_connectors/public/components/search_index/connector/connector_overview_panels.tsx index 7b1aee67397c7..83801ea9ef052 100644 --- a/x-pack/platform/plugins/shared/content_connectors/public/components/search_index/connector/connector_overview_panels.tsx +++ b/x-pack/platform/plugins/shared/content_connectors/public/components/search_index/connector/connector_overview_panels.tsx @@ -69,6 +69,7 @@ export const ConnectorOverviewPanels: React.FC = () => { > {ingestionStatus === IngestionStatus.INCOMPLETE ? ( > = ({ childre {isEditing && ( { setIsEditing(!isEditing); @@ -62,6 +63,7 @@ export const ConnectorSyncRulesForm: FC> = ({ childre )} { {getSyncRulesDescription(indexName)} - + {SYNC_RULES_LEARN_MORE_LINK} @@ -92,6 +97,7 @@ export const SyncRulesTable: React.FC = () => { { editingRender: (filteringRule, onChange) => ( onChange(e.target.value)} @@ -119,6 +125,7 @@ export const SyncRulesTable: React.FC = () => { onChange(e.target.value)} @@ -138,6 +145,7 @@ export const SyncRulesTable: React.FC = () => { { editingRender: (filteringRule, onChange) => ( onChange(e.target.value)} @@ -157,6 +165,7 @@ export const SyncRulesTable: React.FC = () => { onChange(e.target.value)} diff --git a/x-pack/platform/plugins/shared/content_connectors/public/components/search_index/connector/sync_rules/sync_rules_callouts.tsx b/x-pack/platform/plugins/shared/content_connectors/public/components/search_index/connector/sync_rules/sync_rules_callouts.tsx index f812972225561..d3dd3741f8ccc 100644 --- a/x-pack/platform/plugins/shared/content_connectors/public/components/search_index/connector/sync_rules/sync_rules_callouts.tsx +++ b/x-pack/platform/plugins/shared/content_connectors/public/components/search_index/connector/sync_rules/sync_rules_callouts.tsx @@ -58,6 +58,7 @@ export const SyncRulesStateCallouts: React.FC = ({ = ({ = ({ = ({ { description="some description" title="some title" links={ - + test link to nowhere } @@ -81,10 +81,14 @@ describe('PageIntroduction component', () => { description="some description" title="some title" links={[ - + test link to nowhere , - + test link to nowhere2 , ]} diff --git a/x-pack/platform/plugins/shared/content_connectors/public/components/shared/tables/inline_editable_table/action_column.tsx b/x-pack/platform/plugins/shared/content_connectors/public/components/shared/tables/inline_editable_table/action_column.tsx index fb4e88efacf9f..5606eb0495e49 100644 --- a/x-pack/platform/plugins/shared/content_connectors/public/components/shared/tables/inline_editable_table/action_column.tsx +++ b/x-pack/platform/plugins/shared/content_connectors/public/components/shared/tables/inline_editable_table/action_column.tsx @@ -112,7 +112,12 @@ export const ActionColumn = ({ {!canRemoveLastItem && displayedItems.length === 1 ? ( - + {DELETE_BUTTON_LABEL} diff --git a/x-pack/platform/plugins/shared/search_inference_endpoints/public/components/elastic_inference_service/header.tsx b/x-pack/platform/plugins/shared/search_inference_endpoints/public/components/elastic_inference_service/header.tsx index 1f0146bdfc2a6..9df347991d120 100644 --- a/x-pack/platform/plugins/shared/search_inference_endpoints/public/components/elastic_inference_service/header.tsx +++ b/x-pack/platform/plugins/shared/search_inference_endpoints/public/components/elastic_inference_service/header.tsx @@ -43,6 +43,7 @@ export const ElasticInferenceServiceModelsHeader = () => { ...(cloud?.isCloudEnabled && billingUrl ? [ = ({ fullWidth > = ({ data-test-subj="addEndpointIdField" prepend={ = ({ defaultMessage: 'Documentation', }), description: ( - + {i18n.translate( 'xpack.searchInferenceEndpoints.modelDetailFlyout.viewDocumentationLink', { defaultMessage: 'View documentation' } diff --git a/x-pack/platform/plugins/shared/search_inference_endpoints/public/components/model_detail_flyout/model_endpoint_row.tsx b/x-pack/platform/plugins/shared/search_inference_endpoints/public/components/model_detail_flyout/model_endpoint_row.tsx index 98bfb263412f0..028c32c52bed9 100644 --- a/x-pack/platform/plugins/shared/search_inference_endpoints/public/components/model_detail_flyout/model_endpoint_row.tsx +++ b/x-pack/platform/plugins/shared/search_inference_endpoints/public/components/model_detail_flyout/model_endpoint_row.tsx @@ -48,6 +48,7 @@ export const ModelEndpointRow: React.FC = ({ )} > = ({ )} > = ({ >