Skip to content

Commit f77d11c

Browse files
authored
[8.x] Update API URLs in doc link service (#215084) (#218492)
# Backport This will backport the following commits from `main` to `8.x`: - [Update API URLs in doc link service (#215084)](#215084) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Lisa Cawley","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-04-16T14:18:47Z","message":"Update API URLs in doc link service (#215084)\n\n\nCo-authored-by: Ignacio Rivas <[email protected]>\nCo-authored-by: Jean-Louis Leysens <[email protected]>","sha":"b969cc9e3dac819c0498ab2e68e27a74c4b91a88","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Docs","release_note:skip","docs","backport:version","v9.1.0","v8.19.0","v8.18.1","v9.0.1"],"title":"Update API URLs in doc link service","number":215084,"url":"https://github.com/elastic/kibana/pull/215084","mergeCommit":{"message":"Update API URLs in doc link service (#215084)\n\n\nCo-authored-by: Ignacio Rivas <[email protected]>\nCo-authored-by: Jean-Louis Leysens <[email protected]>","sha":"b969cc9e3dac819c0498ab2e68e27a74c4b91a88"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.18"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/215084","number":215084,"mergeCommit":{"message":"Update API URLs in doc link service (#215084)\n\n\nCo-authored-by: Ignacio Rivas <[email protected]>\nCo-authored-by: Jean-Louis Leysens <[email protected]>","sha":"b969cc9e3dac819c0498ab2e68e27a74c4b91a88"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/218457","number":218457,"state":"OPEN"}]}] BACKPORT-->
1 parent 1d0b768 commit f77d11c

File tree

5 files changed

+104
-52
lines changed

5 files changed

+104
-52
lines changed

src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts

Lines changed: 94 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,14 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
2525
const DOCS_WEBSITE_URL = meta.docsWebsiteUrl;
2626
const ELASTIC_GITHUB = meta.elasticGithubUrl;
2727
const SEARCH_LABS_URL = meta.searchLabsUrl;
28+
const API_DOCS = meta.apiDocsUrl;
2829

2930
const ELASTICSEARCH_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/reference/${DOC_LINK_VERSION}/`;
31+
const ELASTICSEARCH_APIS = `${API_DOCS}doc/elasticsearch/v8/`;
32+
const ELASTICSEARCH_SERVERLESS_APIS = `${API_DOCS}doc/elasticsearch-serverless/`;
3033
const KIBANA_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/`;
34+
const KIBANA_APIS = `${API_DOCS}doc/kibana/v8/`;
35+
const KIBANA_SERVERLESS_APIS = `{$API_DOCS}doc/serverless/`;
3136
const FLEET_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/fleet/${DOC_LINK_VERSION}/`;
3237
const INTEGRATIONS_DEV_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/integrations-developer/current/`;
3338
const PLUGIN_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/plugins/${DOC_LINK_VERSION}/`;
@@ -159,7 +164,9 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
159164
behavioralAnalyticsCORS: `${ELASTICSEARCH_DOCS}behavioral-analytics-cors.html`,
160165
behavioralAnalyticsEvents: `${ELASTICSEARCH_DOCS}behavioral-analytics-event.html`,
161166
buildConnector: `${ELASTICSEARCH_DOCS}es-build-connector.html`,
162-
bulkApi: `${ELASTICSEARCH_DOCS}docs-bulk.html`,
167+
bulkApi: isServerless
168+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-bulk`
169+
: `${ELASTICSEARCH_APIS}operation/operation-bulk`,
163170
configuration: `${ENTERPRISE_SEARCH_DOCS}configuration.html`,
164171
connectors: `${ELASTICSEARCH_DOCS}es-connectors.html`,
165172
connectorsClientDeploy: `${ELASTICSEARCH_DOCS}es-build-connector.html#es-connectors-deploy-connector-service`,
@@ -202,8 +209,12 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
202209
e5Model: `${MACHINE_LEARNING_DOCS}ml-nlp-e5.html`,
203210
elser: `${ELASTICSEARCH_DOCS}semantic-search-semantic-text.html`,
204211
engines: `${ENTERPRISE_SEARCH_DOCS}engines.html`,
205-
indexApi: `${ELASTICSEARCH_DOCS}docs-index_.html`,
206-
inferenceApiCreate: `${ELASTICSEARCH_DOCS}put-inference-api.html`,
212+
indexApi: isServerless
213+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-create`
214+
: `${ELASTICSEARCH_APIS}operation/operation-create`,
215+
inferenceApiCreate: isServerless
216+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-inference-put`
217+
: `${ELASTICSEARCH_APIS}operation/operation-inference-put`,
207218
ingestionApis: `${ELASTICSEARCH_DOCS}search-with-elasticsearch.html`,
208219
ingestPipelines: `${ELASTICSEARCH_DOCS}ingest-pipeline-search.html`,
209220
knnSearch: `${ELASTICSEARCH_DOCS}knn-search.html`,
@@ -362,7 +373,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
362373
autocompleteSuggestions: `${KIBANA_DOCS}kibana-concepts-analysts.html#autocomplete-suggestions`,
363374
secureSavedObject: `${KIBANA_DOCS}xpack-security-secure-saved-objects.html`,
364375
xpackSecurity: `${KIBANA_DOCS}xpack-security.html`,
365-
restApis: `${KIBANA_DOCS}api.html`,
376+
restApis: isServerless ? `${KIBANA_SERVERLESS_APIS}` : `${KIBANA_APIS}`,
366377
dashboardImportExport: `${KIBANA_DOCS}dashboard-api.html`,
367378
legacyOpenSslProvider: `${KIBANA_DOCS}production.html#openssl-legacy-provider`,
368379
},
@@ -371,7 +382,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
371382
batchReindex: `${KIBANA_DOCS}batch-start-resume-reindex.html`,
372383
indexBlocks: `${ELASTICSEARCH_DOCS}index-modules-blocks.html#index-block-settings`,
373384
remoteReindex: `${ELASTICSEARCH_DOCS}docs-reindex.html#reindex-from-remote`,
374-
unfreezeApi: `${ELASTICSEARCH_DOCS}unfreeze-index-api.html`,
385+
unfreezeApi: `${ELASTICSEARCH_DOCS}/unfreeze-index-api.html`,
375386
reindexWithPipeline: `${ELASTICSEARCH_DOCS}docs-reindex.html#reindex-with-an-ingest-pipeline`,
376387
logsDatastream: `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/reference/${DOC_LINK_VERSION}/logs-data-stream.html`,
377388
usingLogsDbIndexModeWithESSecurity: `${ELASTIC_WEBSITE_URL}guide/en/security/${DOC_LINK_VERSION}/detections-logsdb-index-mode-impact.html`,
@@ -564,7 +575,9 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
564575
visualizationSettings: `${KIBANA_DOCS}advanced-options.html#kibana-visualization-settings`,
565576
timelionSettings: `${KIBANA_DOCS}advanced-options.html#kibana-timelion-settings`,
566577
generalSettings: `${KIBANA_DOCS}advanced-options.html#kibana-general-settings`,
567-
savedObjectsApiList: `${KIBANA_DOCS}saved-objects-api.html#saved-objects-api`,
578+
savedObjectsApiList: isServerless
579+
? `${KIBANA_SERVERLESS_APIS}group/endpoint-saved-objects`
580+
: `${KIBANA_APIS}group/endpoint-saved-objects`,
568581
apiKeys: `${KIBANA_DOCS}api-keys.html`,
569582
},
570583
ml: {
@@ -773,41 +786,78 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
773786
skippingDisconnectedClusters: `${ELASTICSEARCH_DOCS}modules-cross-cluster-search.html#skip-unavailable-clusters`,
774787
},
775788
apis: {
776-
bulkIndexAlias: `${ELASTICSEARCH_DOCS}indices-aliases.html`,
777-
indexStats: `${ELASTICSEARCH_DOCS}indices-stats.html`,
789+
bulkIndexAlias: isServerless
790+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-indices-update-aliases`
791+
: `${ELASTICSEARCH_APIS}operation/operation-indices-update-aliases`,
792+
indexStats: isServerless
793+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-indices-update-aliases`
794+
: `${ELASTICSEARCH_APIS}operation/operation-indices-stats`,
778795
byteSizeUnits: `${ELASTICSEARCH_DOCS}api-conventions.html#byte-units`,
779-
createAutoFollowPattern: `${ELASTICSEARCH_DOCS}ccr-put-auto-follow-pattern.html`,
780-
createFollower: `${ELASTICSEARCH_DOCS}ccr-put-follow.html`,
781-
createIndex: `${ELASTICSEARCH_DOCS}indices-create-index.html`,
782-
createSnapshotLifecyclePolicy: `${ELASTICSEARCH_DOCS}slm-api-put-policy.html`,
783-
createRoleMapping: `${ELASTICSEARCH_DOCS}security-api-put-role-mapping.html`,
784-
createRoleMappingTemplates: `${ELASTICSEARCH_DOCS}security-api-put-role-mapping.html#_role_templates`,
785-
createRollupJobsRequest: `${ELASTICSEARCH_DOCS}rollup-put-job.html#rollup-put-job-api-request-body`,
786-
createApiKey: `${ELASTICSEARCH_DOCS}security-api-create-api-key.html`,
787-
createPipeline: `${ELASTICSEARCH_DOCS}put-pipeline-api.html`,
788-
createTransformRequest: `${ELASTICSEARCH_DOCS}put-transform.html#put-transform-request-body`,
796+
createAutoFollowPattern: `${ELASTICSEARCH_APIS}operation/operation-ccr-put-auto-follow-pattern`,
797+
createFollower: `${ELASTICSEARCH_APIS}operation/operation-ccr-follow`,
798+
createIndex: isServerless
799+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-indices-create`
800+
: `${ELASTICSEARCH_APIS}operation/operation-indices-create`,
801+
createSnapshotLifecyclePolicy: `${ELASTICSEARCH_APIS}operation/operation-slm-put-lifecycle`,
802+
createRoleMapping: `${ELASTICSEARCH_APIS}operation/operation-security-put-role-mapping`,
803+
createRoleMappingTemplates: `${ELASTICSEARCH_APIS}operation/operation-security-put-role-mapping`,
804+
createRollupJobsRequest: `${ELASTICSEARCH_APIS}operation/operation-rollup-put-job#operation-rollup-put-job-body-application-json`,
805+
createApiKey: isServerless
806+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-security-create-api-key`
807+
: `${ELASTICSEARCH_APIS}operation/operation-security-create-api-key`,
808+
createPipeline: isServerless
809+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-ingest-put-pipeline`
810+
: `${ELASTICSEARCH_APIS}operation/operation-ingest-put-pipeline`,
811+
createTransformRequest: isServerless
812+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-transform-put-transform`
813+
: `${ELASTICSEARCH_APIS}operation/operation-transform-put-transform`,
789814
cronExpressions: `${ELASTICSEARCH_DOCS}cron-expressions.html`,
790-
executeWatchActionModes: `${ELASTICSEARCH_DOCS}watcher-api-execute-watch.html#watcher-api-execute-watch-action-mode`,
791-
indexExists: `${ELASTICSEARCH_DOCS}indices-exists.html`,
792-
inferTrainedModel: `${ELASTICSEARCH_DOCS}infer-trained-model.html`,
793-
multiSearch: `${ELASTICSEARCH_DOCS}search-multi-search.html`,
794-
openIndex: `${ELASTICSEARCH_DOCS}indices-open-close.html`,
795-
putComponentTemplate: `${ELASTICSEARCH_DOCS}indices-component-template.html`,
796-
painlessExecute: `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/painless/${DOC_LINK_VERSION}/painless-execute-api.html`,
797-
painlessExecuteAPIContexts: `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/painless/${DOC_LINK_VERSION}/painless-execute-api.html#_contexts`,
798-
putComponentTemplateMetadata: `${ELASTICSEARCH_DOCS}indices-component-template.html#component-templates-metadata`,
799-
putEnrichPolicy: `${ELASTICSEARCH_DOCS}put-enrich-policy-api.html`,
800-
putIndexTemplateV1: `${ELASTICSEARCH_DOCS}indices-templates-v1.html`,
801-
putSnapshotLifecyclePolicy: `${ELASTICSEARCH_DOCS}slm-api-put-policy.html`,
802-
putWatch: `${ELASTICSEARCH_DOCS}watcher-api-put-watch.html`,
803-
restApis: `${ELASTICSEARCH_DOCS}rest-apis.html`,
804-
searchPreference: `${ELASTICSEARCH_DOCS}search-search.html#search-preference`,
805-
securityApis: `${ELASTICSEARCH_DOCS}security-api.html`,
806-
simulatePipeline: `${ELASTICSEARCH_DOCS}simulate-pipeline-api.html`,
807-
tasks: `${ELASTICSEARCH_DOCS}tasks.html`,
815+
executeWatchActionModes: `${ELASTICSEARCH_APIS}operation/operation-watcher-execute-watch#operation-watcher-execute-watch-body-application-json`,
816+
indexExists: isServerless
817+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-indices-exists`
818+
: `${ELASTICSEARCH_APIS}operation/operation-indices-exists`,
819+
inferTrainedModel: isServerless
820+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-ml-infer-trained-model`
821+
: `${ELASTICSEARCH_APIS}operation/operation-ml-infer-trained-model`,
822+
multiSearch: isServerless
823+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-msearch`
824+
: `${ELASTICSEARCH_APIS}operation/operation-msearch`,
825+
openIndex: `${ELASTICSEARCH_APIS}operation/operation-indices-open`,
826+
putComponentTemplate: isServerless
827+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-cluster-put-component-template`
828+
: `${ELASTICSEARCH_APIS}operation/operation-cluster-put-component-template`,
829+
painlessExecute: isServerless
830+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-scripts-painless-execute`
831+
: `${ELASTICSEARCH_APIS}operation/operation-scripts-painless-execute`,
832+
painlessExecuteAPIContexts: isServerless
833+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-scripts-painless-execute#operation-scripts-painless-execute-body-application-json`
834+
: `${ELASTICSEARCH_APIS}operation/operation-scripts-painless-execute#operation-scripts-painless-execute-body-application-json`,
835+
putComponentTemplateMetadata: isServerless
836+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-cluster-put-component-template#operation-cluster-put-component-template-body-application-json-_meta`
837+
: `${ELASTICSEARCH_APIS}operation/operation-cluster-put-component-template#operation-cluster-put-component-template-body-application-json-_meta`,
838+
putEnrichPolicy: isServerless
839+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-enrich-put-policy`
840+
: `${ELASTICSEARCH_APIS}operation/operation-enrich-put-policy`,
841+
putIndexTemplateV1: `${ELASTICSEARCH_APIS}operation/operation-indices-put-template`,
842+
putSnapshotLifecyclePolicy: `${ELASTICSEARCH_APIS}operation/operation-slm-put-lifecycle`,
843+
putWatch: `${ELASTICSEARCH_APIS}operation/operation-watcher-put-watch`,
844+
restApis: isServerless ? `${ELASTICSEARCH_SERVERLESS_APIS}` : `${ELASTICSEARCH_APIS}`,
845+
searchPreference: isServerless
846+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-search#operation-search-preference`
847+
: `${ELASTICSEARCH_APIS}operation/operation-search#operation-search-preference`,
848+
securityApis: isServerless
849+
? `${ELASTICSEARCH_SERVERLESS_APIS}group/endpoint-security`
850+
: `${ELASTICSEARCH_APIS}group/endpoint-security`,
851+
simulatePipeline: isServerless
852+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-ingest-simulate`
853+
: `${ELASTICSEARCH_APIS}operation/operation-ingest-simulate`,
854+
tasks: isServerless
855+
? `${ELASTICSEARCH_SERVERLESS_APIS}group/endpoint-tasks`
856+
: `${ELASTICSEARCH_APIS}group/endpoint-tasks`,
808857
timeUnits: `${ELASTICSEARCH_DOCS}api-conventions.html#time-units`,
809-
unfreezeIndex: `${ELASTICSEARCH_DOCS}unfreeze-index-api.html`,
810-
updateTransform: `${ELASTICSEARCH_DOCS}update-transform.html`,
858+
updateTransform: isServerless
859+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-transform-update-transform`
860+
: `${ELASTICSEARCH_APIS}operation/operation-transform-update-transform`,
811861
},
812862
plugins: {
813863
azureRepo: `${ELASTICSEARCH_DOCS}repository-azure.html`,
@@ -822,14 +872,14 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
822872
guide: `${ELASTICSEARCH_DOCS}snapshot-restore.html`,
823873
changeIndexSettings: `${ELASTICSEARCH_DOCS}index-modules.html`,
824874
createSnapshot: `${ELASTICSEARCH_DOCS}snapshots-take-snapshot.html`,
825-
getSnapshot: `${ELASTICSEARCH_DOCS}get-snapshot-api.html`,
875+
getSnapshot: `${ELASTICSEARCH_APIS}operation/operation-snapshot-get`,
826876
registerSharedFileSystem: `${ELASTICSEARCH_DOCS}snapshots-filesystem-repository.html#filesystem-repository-settings`,
827877
registerSourceOnly: `${ELASTICSEARCH_DOCS}snapshots-source-only-repository.html#source-only-repository-settings`,
828878
registerUrl: `${ELASTICSEARCH_DOCS}snapshots-read-only-repository.html#read-only-url-repository-settings`,
829879
restoreSnapshot: `${ELASTICSEARCH_DOCS}snapshots-restore-snapshot.html`,
830-
restoreSnapshotApi: `${ELASTICSEARCH_DOCS}restore-snapshot-api.html#restore-snapshot-api-request-body`,
880+
restoreSnapshotApi: `${ELASTICSEARCH_APIS}operation/operation-snapshot-restore`,
831881
searchableSnapshotSharedCache: `${ELASTICSEARCH_DOCS}searchable-snapshots.html#searchable-snapshots-shared-cache`,
832-
slmStart: `${ELASTICSEARCH_DOCS}slm-api-start.html`,
882+
slmStart: `${ELASTICSEARCH_APIS}operation/operation-slm-start`,
833883
},
834884
ingest: {
835885
append: `${ELASTICSEARCH_DOCS}append-processor.html`,
@@ -1041,7 +1091,9 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
10411091
hiddenFields: `${KIBANA_DOCS}playground-query.html#playground-hidden-fields`,
10421092
},
10431093
inferenceManagement: {
1044-
inferenceAPIDocumentation: `${ELASTIC_WEBSITE_URL}docs/api/doc/elasticsearch/operation/operation-inference-put`,
1094+
inferenceAPIDocumentation: isServerless
1095+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-inference-put`
1096+
: `${ELASTICSEARCH_APIS}operation/operation-inference-put`,
10451097
},
10461098
cases: {
10471099
legacyApiDeprecations: `${KIBANA_DOCS}breaking-changes-summary.html#breaking-201004`,

src/platform/packages/shared/kbn-doc-links/src/get_doc_meta.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,6 @@ export const getDocLinksMeta = ({
2525
elasticGithubUrl: 'https://github.com/elastic/',
2626
docsWebsiteUrl: 'https://docs.elastic.co/',
2727
searchLabsUrl: 'https://search-labs.elastic.co/',
28+
apiDocsUrl: 'https://www.elastic.co/docs/api/',
2829
};
2930
};

src/platform/packages/shared/kbn-doc-links/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export interface DocLinksMeta {
1717
elasticGithubUrl: string;
1818
docsWebsiteUrl: string;
1919
searchLabsUrl: string;
20+
apiDocsUrl: string;
2021
}
2122

2223
/**
@@ -445,7 +446,6 @@ export interface DocLinks {
445446
simulatePipeline: string;
446447
tasks: string;
447448
timeUnits: string;
448-
unfreezeIndex: string;
449449
updateTransform: string;
450450
}>;
451451
readonly observability: Readonly<{

src/platform/plugins/shared/saved_objects_management/public/management_section/object_view/components/__snapshots__/not_found_errors.test.tsx.snap

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/platform/plugins/shared/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,13 +222,12 @@ describe('<IndexDetailsPage />', () => {
222222
expect(tabContent).toEqual(JSON.stringify(testIndexStats, null, 2));
223223
});
224224

225-
it('sets the docs link href from the documenation service', async () => {
225+
it('sets the docs link href from the documentation service', async () => {
226226
await testBed.actions.clickIndexDetailsTab(IndexDetailsSection.Stats);
227227
const docsLinkHref = testBed.actions.stats.getDocsLinkHref();
228-
// the url from the mocked docs mock
229-
expect(docsLinkHref).toEqual(
230-
'https://www.elastic.co/guide/en/elasticsearch/reference/mocked-test-branch/indices-stats.html'
231-
);
228+
229+
expect(docsLinkHref).toMatch(/^https:\/\/www\.elastic\.co\//);
230+
expect(docsLinkHref).toContain('indices-stats');
232231
});
233232

234233
it('renders a warning message if an index is not open', async () => {

0 commit comments

Comments
 (0)