Skip to content

Commit f90e078

Browse files
authored
[8.18] Update API URLs in doc link service (#215084) (#218493)
# Backport This will backport the following commits from `main` to `8.18`: - [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 c602c8f commit f90e078

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}/`;
@@ -49,7 +54,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
4954
elasticStackGetStarted: isServerless
5055
? `${SERVERLESS_DOCS}intro.html`
5156
: `${ELASTIC_WEBSITE_URL}guide/en/index.html`,
52-
apiReference: `${ELASTIC_WEBSITE_URL}guide/en/starting-with-the-elasticsearch-platform-and-its-solutions/current/api-reference.html`,
57+
apiReference: `${API_DOCS}`,
5358
upgrade: {
5459
upgradingStackOnPrem: `${ELASTIC_WEBSITE_URL}guide/en/elastic-stack/current/upgrading-elastic-stack-on-prem.html`,
5560
upgradingStackOnCloud: `${ELASTIC_WEBSITE_URL}guide/en/elastic-stack/current/upgrade-elastic-stack-for-elastic-cloud.html`,
@@ -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
inferenceApisConfigureChunking: `${ELASTICSEARCH_DOCS}inference-apis.html#infer-chunking-config`,
208219
ingestionApis: `${ELASTICSEARCH_DOCS}search-with-elasticsearch.html`,
209220
ingestPipelines: `${ELASTICSEARCH_DOCS}ingest-pipeline-search.html`,
@@ -363,7 +374,7 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
363374
autocompleteSuggestions: `${KIBANA_DOCS}kibana-concepts-analysts.html#autocomplete-suggestions`,
364375
secureSavedObject: `${KIBANA_DOCS}xpack-security-secure-saved-objects.html`,
365376
xpackSecurity: `${KIBANA_DOCS}xpack-security.html`,
366-
restApis: `${KIBANA_DOCS}api.html`,
377+
restApis: isServerless ? `${KIBANA_SERVERLESS_APIS}` : `${KIBANA_APIS}`,
367378
dashboardImportExport: `${KIBANA_DOCS}dashboard-api.html`,
368379
legacyOpenSslProvider: `${KIBANA_DOCS}production.html#openssl-legacy-provider`,
369380
},
@@ -562,7 +573,9 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
562573
visualizationSettings: `${KIBANA_DOCS}advanced-options.html#kibana-visualization-settings`,
563574
timelionSettings: `${KIBANA_DOCS}advanced-options.html#kibana-timelion-settings`,
564575
generalSettings: `${KIBANA_DOCS}advanced-options.html#kibana-general-settings`,
565-
savedObjectsApiList: `${KIBANA_DOCS}saved-objects-api.html#saved-objects-api`,
576+
savedObjectsApiList: isServerless
577+
? `${KIBANA_SERVERLESS_APIS}group/endpoint-saved-objects`
578+
: `${KIBANA_APIS}group/endpoint-saved-objects`,
566579
apiKeys: `${KIBANA_DOCS}api-keys.html`,
567580
},
568581
ml: {
@@ -771,41 +784,78 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
771784
skippingDisconnectedClusters: `${ELASTICSEARCH_DOCS}modules-cross-cluster-search.html#skip-unavailable-clusters`,
772785
},
773786
apis: {
774-
bulkIndexAlias: `${ELASTICSEARCH_DOCS}indices-aliases.html`,
775-
indexStats: `${ELASTICSEARCH_DOCS}indices-stats.html`,
787+
bulkIndexAlias: isServerless
788+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-indices-update-aliases`
789+
: `${ELASTICSEARCH_APIS}operation/operation-indices-update-aliases`,
790+
indexStats: isServerless
791+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-indices-update-aliases`
792+
: `${ELASTICSEARCH_APIS}operation/operation-indices-stats`,
776793
byteSizeUnits: `${ELASTICSEARCH_DOCS}api-conventions.html#byte-units`,
777-
createAutoFollowPattern: `${ELASTICSEARCH_DOCS}ccr-put-auto-follow-pattern.html`,
778-
createFollower: `${ELASTICSEARCH_DOCS}ccr-put-follow.html`,
779-
createIndex: `${ELASTICSEARCH_DOCS}indices-create-index.html`,
780-
createSnapshotLifecyclePolicy: `${ELASTICSEARCH_DOCS}slm-api-put-policy.html`,
781-
createRoleMapping: `${ELASTICSEARCH_DOCS}security-api-put-role-mapping.html`,
782-
createRoleMappingTemplates: `${ELASTICSEARCH_DOCS}security-api-put-role-mapping.html#_role_templates`,
783-
createRollupJobsRequest: `${ELASTICSEARCH_DOCS}rollup-put-job.html#rollup-put-job-api-request-body`,
784-
createApiKey: `${ELASTICSEARCH_DOCS}security-api-create-api-key.html`,
785-
createPipeline: `${ELASTICSEARCH_DOCS}put-pipeline-api.html`,
786-
createTransformRequest: `${ELASTICSEARCH_DOCS}put-transform.html#put-transform-request-body`,
794+
createAutoFollowPattern: `${ELASTICSEARCH_APIS}operation/operation-ccr-put-auto-follow-pattern`,
795+
createFollower: `${ELASTICSEARCH_APIS}operation/operation-ccr-follow`,
796+
createIndex: isServerless
797+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-indices-create`
798+
: `${ELASTICSEARCH_APIS}operation/operation-indices-create`,
799+
createSnapshotLifecyclePolicy: `${ELASTICSEARCH_APIS}operation/operation-slm-put-lifecycle`,
800+
createRoleMapping: `${ELASTICSEARCH_APIS}operation/operation-security-put-role-mapping`,
801+
createRoleMappingTemplates: `${ELASTICSEARCH_APIS}operation/operation-security-put-role-mapping`,
802+
createRollupJobsRequest: `${ELASTICSEARCH_APIS}operation/operation-rollup-put-job#operation-rollup-put-job-body-application-json`,
803+
createApiKey: isServerless
804+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-security-create-api-key`
805+
: `${ELASTICSEARCH_APIS}operation/operation-security-create-api-key`,
806+
createPipeline: isServerless
807+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-ingest-put-pipeline`
808+
: `${ELASTICSEARCH_APIS}operation/operation-ingest-put-pipeline`,
809+
createTransformRequest: isServerless
810+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-transform-put-transform`
811+
: `${ELASTICSEARCH_APIS}operation/operation-transform-put-transform`,
787812
cronExpressions: `${ELASTICSEARCH_DOCS}cron-expressions.html`,
788-
executeWatchActionModes: `${ELASTICSEARCH_DOCS}watcher-api-execute-watch.html#watcher-api-execute-watch-action-mode`,
789-
indexExists: `${ELASTICSEARCH_DOCS}indices-exists.html`,
790-
inferTrainedModel: `${ELASTICSEARCH_DOCS}infer-trained-model.html`,
791-
multiSearch: `${ELASTICSEARCH_DOCS}search-multi-search.html`,
792-
openIndex: `${ELASTICSEARCH_DOCS}indices-open-close.html`,
793-
putComponentTemplate: `${ELASTICSEARCH_DOCS}indices-component-template.html`,
794-
painlessExecute: `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/painless/${DOC_LINK_VERSION}/painless-execute-api.html`,
795-
painlessExecuteAPIContexts: `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/painless/${DOC_LINK_VERSION}/painless-execute-api.html#_contexts`,
796-
putComponentTemplateMetadata: `${ELASTICSEARCH_DOCS}indices-component-template.html#component-templates-metadata`,
797-
putEnrichPolicy: `${ELASTICSEARCH_DOCS}put-enrich-policy-api.html`,
798-
putIndexTemplateV1: `${ELASTICSEARCH_DOCS}indices-templates-v1.html`,
799-
putSnapshotLifecyclePolicy: `${ELASTICSEARCH_DOCS}slm-api-put-policy.html`,
800-
putWatch: `${ELASTICSEARCH_DOCS}watcher-api-put-watch.html`,
801-
restApis: `${ELASTICSEARCH_DOCS}rest-apis.html`,
802-
searchPreference: `${ELASTICSEARCH_DOCS}search-search.html#search-preference`,
803-
securityApis: `${ELASTICSEARCH_DOCS}security-api.html`,
804-
simulatePipeline: `${ELASTICSEARCH_DOCS}simulate-pipeline-api.html`,
805-
tasks: `${ELASTICSEARCH_DOCS}tasks.html`,
813+
executeWatchActionModes: `${ELASTICSEARCH_APIS}operation/operation-watcher-execute-watch#operation-watcher-execute-watch-body-application-json`,
814+
indexExists: isServerless
815+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-indices-exists`
816+
: `${ELASTICSEARCH_APIS}operation/operation-indices-exists`,
817+
inferTrainedModel: isServerless
818+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-ml-infer-trained-model`
819+
: `${ELASTICSEARCH_APIS}operation/operation-ml-infer-trained-model`,
820+
multiSearch: isServerless
821+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-msearch`
822+
: `${ELASTICSEARCH_APIS}operation/operation-msearch`,
823+
openIndex: `${ELASTICSEARCH_APIS}operation/operation-indices-open`,
824+
putComponentTemplate: isServerless
825+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-cluster-put-component-template`
826+
: `${ELASTICSEARCH_APIS}operation/operation-cluster-put-component-template`,
827+
painlessExecute: isServerless
828+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-scripts-painless-execute`
829+
: `${ELASTICSEARCH_APIS}operation/operation-scripts-painless-execute`,
830+
painlessExecuteAPIContexts: isServerless
831+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-scripts-painless-execute#operation-scripts-painless-execute-body-application-json`
832+
: `${ELASTICSEARCH_APIS}operation/operation-scripts-painless-execute#operation-scripts-painless-execute-body-application-json`,
833+
putComponentTemplateMetadata: isServerless
834+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-cluster-put-component-template#operation-cluster-put-component-template-body-application-json-_meta`
835+
: `${ELASTICSEARCH_APIS}operation/operation-cluster-put-component-template#operation-cluster-put-component-template-body-application-json-_meta`,
836+
putEnrichPolicy: isServerless
837+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-enrich-put-policy`
838+
: `${ELASTICSEARCH_APIS}operation/operation-enrich-put-policy`,
839+
putIndexTemplateV1: `${ELASTICSEARCH_APIS}operation/operation-indices-put-template`,
840+
putSnapshotLifecyclePolicy: `${ELASTICSEARCH_APIS}operation/operation-slm-put-lifecycle`,
841+
putWatch: `${ELASTICSEARCH_APIS}operation/operation-watcher-put-watch`,
842+
restApis: isServerless ? `${ELASTICSEARCH_SERVERLESS_APIS}` : `${ELASTICSEARCH_APIS}`,
843+
searchPreference: isServerless
844+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-search#operation-search-preference`
845+
: `${ELASTICSEARCH_APIS}operation/operation-search#operation-search-preference`,
846+
securityApis: isServerless
847+
? `${ELASTICSEARCH_SERVERLESS_APIS}group/endpoint-security`
848+
: `${ELASTICSEARCH_APIS}group/endpoint-security`,
849+
simulatePipeline: isServerless
850+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-ingest-simulate`
851+
: `${ELASTICSEARCH_APIS}operation/operation-ingest-simulate`,
852+
tasks: isServerless
853+
? `${ELASTICSEARCH_SERVERLESS_APIS}group/endpoint-tasks`
854+
: `${ELASTICSEARCH_APIS}group/endpoint-tasks`,
806855
timeUnits: `${ELASTICSEARCH_DOCS}api-conventions.html#time-units`,
807-
unfreezeIndex: `${ELASTICSEARCH_DOCS}unfreeze-index-api.html`,
808-
updateTransform: `${ELASTICSEARCH_DOCS}update-transform.html`,
856+
updateTransform: isServerless
857+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-transform-update-transform`
858+
: `${ELASTICSEARCH_APIS}operation/operation-transform-update-transform`,
809859
},
810860
plugins: {
811861
azureRepo: `${ELASTICSEARCH_DOCS}repository-azure.html`,
@@ -820,14 +870,14 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
820870
guide: `${ELASTICSEARCH_DOCS}snapshot-restore.html`,
821871
changeIndexSettings: `${ELASTICSEARCH_DOCS}index-modules.html`,
822872
createSnapshot: `${ELASTICSEARCH_DOCS}snapshots-take-snapshot.html`,
823-
getSnapshot: `${ELASTICSEARCH_DOCS}get-snapshot-api.html`,
873+
getSnapshot: `${ELASTICSEARCH_APIS}operation/operation-snapshot-get`,
824874
registerSharedFileSystem: `${ELASTICSEARCH_DOCS}snapshots-filesystem-repository.html#filesystem-repository-settings`,
825875
registerSourceOnly: `${ELASTICSEARCH_DOCS}snapshots-source-only-repository.html#source-only-repository-settings`,
826876
registerUrl: `${ELASTICSEARCH_DOCS}snapshots-read-only-repository.html#read-only-url-repository-settings`,
827877
restoreSnapshot: `${ELASTICSEARCH_DOCS}snapshots-restore-snapshot.html`,
828-
restoreSnapshotApi: `${ELASTICSEARCH_DOCS}restore-snapshot-api.html#restore-snapshot-api-request-body`,
878+
restoreSnapshotApi: `${ELASTICSEARCH_APIS}operation/operation-snapshot-restore`,
829879
searchableSnapshotSharedCache: `${ELASTICSEARCH_DOCS}searchable-snapshots.html#searchable-snapshots-shared-cache`,
830-
slmStart: `${ELASTICSEARCH_DOCS}slm-api-start.html`,
880+
slmStart: `${ELASTICSEARCH_APIS}operation/operation-slm-start`,
831881
},
832882
ingest: {
833883
append: `${ELASTICSEARCH_DOCS}append-processor.html`,
@@ -1039,7 +1089,9 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D
10391089
hiddenFields: `${KIBANA_DOCS}playground-query.html#playground-hidden-fields`,
10401090
},
10411091
inferenceManagement: {
1042-
inferenceAPIDocumentation: `${ELASTIC_WEBSITE_URL}docs/api/doc/elasticsearch/operation/operation-inference-put`,
1092+
inferenceAPIDocumentation: isServerless
1093+
? `${ELASTICSEARCH_SERVERLESS_APIS}operation/operation-inference-put`
1094+
: `${ELASTICSEARCH_APIS}operation/operation-inference-put`,
10431095
},
10441096
cases: {
10451097
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
/**
@@ -443,7 +444,6 @@ export interface DocLinks {
443444
simulatePipeline: string;
444445
tasks: string;
445446
timeUnits: string;
446-
unfreezeIndex: string;
447447
updateTransform: string;
448448
}>;
449449
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)