Use doc link services in rollups (#99137)
This commit is contained in:
parent
c092fbfe1a
commit
c787495f00
|
@ -144,6 +144,7 @@ readonly links: {
|
||||||
createSnapshotLifecyclePolicy: string;
|
createSnapshotLifecyclePolicy: string;
|
||||||
createRoleMapping: string;
|
createRoleMapping: string;
|
||||||
createRoleMappingTemplates: string;
|
createRoleMappingTemplates: string;
|
||||||
|
createRollupJobsRequest: string;
|
||||||
createApiKey: string;
|
createApiKey: string;
|
||||||
createPipeline: string;
|
createPipeline: string;
|
||||||
createTransformRequest: string;
|
createTransformRequest: string;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -319,6 +319,7 @@ export class DocLinksService {
|
||||||
createSnapshotLifecyclePolicy: `${ELASTICSEARCH_DOCS}slm-api-put-policy.html`,
|
createSnapshotLifecyclePolicy: `${ELASTICSEARCH_DOCS}slm-api-put-policy.html`,
|
||||||
createRoleMapping: `${ELASTICSEARCH_DOCS}security-api-put-role-mapping.html`,
|
createRoleMapping: `${ELASTICSEARCH_DOCS}security-api-put-role-mapping.html`,
|
||||||
createRoleMappingTemplates: `${ELASTICSEARCH_DOCS}security-api-put-role-mapping.html#_role_templates`,
|
createRoleMappingTemplates: `${ELASTICSEARCH_DOCS}security-api-put-role-mapping.html#_role_templates`,
|
||||||
|
createRollupJobsRequest: `${ELASTICSEARCH_DOCS}rollup-put-job.html#rollup-put-job-api-request-body`,
|
||||||
createApiKey: `${ELASTICSEARCH_DOCS}security-api-create-api-key.html`,
|
createApiKey: `${ELASTICSEARCH_DOCS}security-api-create-api-key.html`,
|
||||||
createPipeline: `${ELASTICSEARCH_DOCS}put-pipeline-api.html`,
|
createPipeline: `${ELASTICSEARCH_DOCS}put-pipeline-api.html`,
|
||||||
createTransformRequest: `${ELASTICSEARCH_DOCS}put-transform.html#put-transform-request-body`,
|
createTransformRequest: `${ELASTICSEARCH_DOCS}put-transform.html#put-transform-request-body`,
|
||||||
|
@ -544,6 +545,7 @@ export interface DocLinksStart {
|
||||||
createSnapshotLifecyclePolicy: string;
|
createSnapshotLifecyclePolicy: string;
|
||||||
createRoleMapping: string;
|
createRoleMapping: string;
|
||||||
createRoleMappingTemplates: string;
|
createRoleMappingTemplates: string;
|
||||||
|
createRollupJobsRequest: string;
|
||||||
createApiKey: string;
|
createApiKey: string;
|
||||||
createPipeline: string;
|
createPipeline: string;
|
||||||
createTransformRequest: string;
|
createTransformRequest: string;
|
||||||
|
|
|
@ -629,6 +629,7 @@ export interface DocLinksStart {
|
||||||
createSnapshotLifecyclePolicy: string;
|
createSnapshotLifecyclePolicy: string;
|
||||||
createRoleMapping: string;
|
createRoleMapping: string;
|
||||||
createRoleMappingTemplates: string;
|
createRoleMappingTemplates: string;
|
||||||
|
createRollupJobsRequest: string;
|
||||||
createApiKey: string;
|
createApiKey: string;
|
||||||
createPipeline: string;
|
createPipeline: string;
|
||||||
createTransformRequest: string;
|
createTransformRequest: string;
|
||||||
|
|
|
@ -28,7 +28,7 @@ import {
|
||||||
import { search } from '../../../../../../../../src/plugins/data/public';
|
import { search } from '../../../../../../../../src/plugins/data/public';
|
||||||
const { parseEsInterval } = search.aggs;
|
const { parseEsInterval } = search.aggs;
|
||||||
|
|
||||||
import { getDateHistogramDetailsUrl, getDateHistogramAggregationUrl } from '../../../services';
|
import { documentationLinks } from '../../../services/documentation_links';
|
||||||
|
|
||||||
import { StepError } from './components';
|
import { StepError } from './components';
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ export class StepDateHistogram extends Component {
|
||||||
<EuiButtonEmpty
|
<EuiButtonEmpty
|
||||||
size="s"
|
size="s"
|
||||||
flush="right"
|
flush="right"
|
||||||
href={getDateHistogramDetailsUrl()}
|
href={documentationLinks.apis.createRollupJobsRequest}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
iconType="help"
|
iconType="help"
|
||||||
data-test-subj="rollupJobCreateDateHistogramDocsButton"
|
data-test-subj="rollupJobCreateDateHistogramDocsButton"
|
||||||
|
@ -220,7 +220,7 @@ export class StepDateHistogram extends Component {
|
||||||
defaultMessage="Define how {link} will operate on your rollup data."
|
defaultMessage="Define how {link} will operate on your rollup data."
|
||||||
values={{
|
values={{
|
||||||
link: (
|
link: (
|
||||||
<EuiLink href={getDateHistogramAggregationUrl()} target="_blank">
|
<EuiLink href={documentationLinks.aggs.date_histogram} target="_blank">
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id="xpack.rollupJobs.create.stepDateHistogramDescription.aggregationsLinkLabel"
|
id="xpack.rollupJobs.create.stepDateHistogramDescription.aggregationsLinkLabel"
|
||||||
defaultMessage="date histogram aggregations"
|
defaultMessage="date histogram aggregations"
|
||||||
|
|
|
@ -21,7 +21,7 @@ import {
|
||||||
EuiTitle,
|
EuiTitle,
|
||||||
} from '@elastic/eui';
|
} from '@elastic/eui';
|
||||||
|
|
||||||
import { getHistogramDetailsUrl } from '../../../services';
|
import { documentationLinks } from '../../../services/documentation_links';
|
||||||
|
|
||||||
import { FieldList } from '../../components';
|
import { FieldList } from '../../components';
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ export class StepHistogram extends Component {
|
||||||
<EuiButtonEmpty
|
<EuiButtonEmpty
|
||||||
size="s"
|
size="s"
|
||||||
flush="right"
|
flush="right"
|
||||||
href={getHistogramDetailsUrl()}
|
href={documentationLinks.apis.createRollupJobsRequest}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
iconType="help"
|
iconType="help"
|
||||||
data-test-subj="rollupJobCreateHistogramDocsButton"
|
data-test-subj="rollupJobCreateHistogramDocsButton"
|
||||||
|
|
|
@ -29,7 +29,7 @@ import { CronEditor } from '../../../../../../../../src/plugins/es_ui_shared/pub
|
||||||
import { indexPatterns } from '../../../../../../../../src/plugins/data/public';
|
import { indexPatterns } from '../../../../../../../../src/plugins/data/public';
|
||||||
|
|
||||||
import { indices } from '../../../../shared_imports';
|
import { indices } from '../../../../shared_imports';
|
||||||
import { getLogisticalDetailsUrl, getCronUrl } from '../../../services';
|
import { documentationLinks } from '../../../services/documentation_links';
|
||||||
import { StepError } from './components';
|
import { StepError } from './components';
|
||||||
|
|
||||||
const indexPatternIllegalCharacters = indexPatterns.ILLEGAL_CHARACTERS_VISIBLE.join(' ');
|
const indexPatternIllegalCharacters = indexPatterns.ILLEGAL_CHARACTERS_VISIBLE.join(' ');
|
||||||
|
@ -149,7 +149,7 @@ export class StepLogistics extends Component {
|
||||||
isInvalid={Boolean(areStepErrorsVisible && errorRollupCron)}
|
isInvalid={Boolean(areStepErrorsVisible && errorRollupCron)}
|
||||||
helpText={
|
helpText={
|
||||||
<p>
|
<p>
|
||||||
<EuiLink href={getCronUrl()} target="_blank">
|
<EuiLink href={documentationLinks.apis.cronExpressions} target="_blank">
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id="xpack.rollupJobs.create.stepLogistics.fieldCron.helpReferenceLinkLabel"
|
id="xpack.rollupJobs.create.stepLogistics.fieldCron.helpReferenceLinkLabel"
|
||||||
defaultMessage="Learn more about cron expressions"
|
defaultMessage="Learn more about cron expressions"
|
||||||
|
@ -263,7 +263,7 @@ export class StepLogistics extends Component {
|
||||||
<EuiButtonEmpty
|
<EuiButtonEmpty
|
||||||
size="s"
|
size="s"
|
||||||
flush="right"
|
flush="right"
|
||||||
href={getLogisticalDetailsUrl()}
|
href={documentationLinks.apis.createRollupJobsRequest}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
iconType="help"
|
iconType="help"
|
||||||
data-test-subj="rollupJobCreateLogisticsDocsButton"
|
data-test-subj="rollupJobCreateLogisticsDocsButton"
|
||||||
|
|
|
@ -23,7 +23,7 @@ import {
|
||||||
EuiButton,
|
EuiButton,
|
||||||
} from '@elastic/eui';
|
} from '@elastic/eui';
|
||||||
|
|
||||||
import { getMetricsDetailsUrl } from '../../../services';
|
import { documentationLinks } from '../../../services/documentation_links';
|
||||||
import { FieldList } from '../../components';
|
import { FieldList } from '../../components';
|
||||||
import { FieldChooser, StepError } from './components';
|
import { FieldChooser, StepError } from './components';
|
||||||
import { METRICS_CONFIG } from '../../../constants';
|
import { METRICS_CONFIG } from '../../../constants';
|
||||||
|
@ -387,7 +387,7 @@ export class StepMetrics extends Component {
|
||||||
<EuiButtonEmpty
|
<EuiButtonEmpty
|
||||||
size="s"
|
size="s"
|
||||||
flush="right"
|
flush="right"
|
||||||
href={getMetricsDetailsUrl()}
|
href={documentationLinks.apis.createRollupJobsRequest}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
iconType="help"
|
iconType="help"
|
||||||
data-test-subj="rollupJobCreateMetricsDocsButton"
|
data-test-subj="rollupJobCreateMetricsDocsButton"
|
||||||
|
|
|
@ -18,7 +18,7 @@ import {
|
||||||
EuiTitle,
|
EuiTitle,
|
||||||
} from '@elastic/eui';
|
} from '@elastic/eui';
|
||||||
|
|
||||||
import { getTermsDetailsUrl } from '../../../services';
|
import { documentationLinks } from '../../../services/documentation_links';
|
||||||
|
|
||||||
import { FieldList } from '../../components';
|
import { FieldList } from '../../components';
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ export class StepTerms extends Component {
|
||||||
<EuiButtonEmpty
|
<EuiButtonEmpty
|
||||||
size="s"
|
size="s"
|
||||||
flush="right"
|
flush="right"
|
||||||
href={getTermsDetailsUrl()}
|
href={documentationLinks.apis.createRollupJobsRequest}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
iconType="help"
|
iconType="help"
|
||||||
data-test-subj="rollupJobCreateTermsDocsButton"
|
data-test-subj="rollupJobCreateTermsDocsButton"
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
||||||
* or more contributor license agreements. Licensed under the Elastic License
|
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
||||||
* 2.0.
|
|
||||||
*/
|
|
||||||
|
|
||||||
let esBase = '';
|
|
||||||
|
|
||||||
export function setEsBaseAndXPackBase(elasticWebsiteUrl, docLinksVersion) {
|
|
||||||
esBase = `${elasticWebsiteUrl}guide/en/elasticsearch/reference/${docLinksVersion}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getLogisticalDetailsUrl = () => `${esBase}/rollup-job-config.html#_logistical_details`;
|
|
||||||
export const getDateHistogramDetailsUrl = () =>
|
|
||||||
`${esBase}/rollup-job-config.html#_date_histogram_2`;
|
|
||||||
export const getTermsDetailsUrl = () => `${esBase}/rollup-job-config.html#_terms_2`;
|
|
||||||
export const getHistogramDetailsUrl = () => `${esBase}/rollup-job-config.html#_histogram_2`;
|
|
||||||
export const getMetricsDetailsUrl = () => `${esBase}/rollup-job-config.html#rollup-metrics-config`;
|
|
||||||
|
|
||||||
export const getDateHistogramAggregationUrl = () =>
|
|
||||||
`${esBase}/search-aggregations-bucket-datehistogram-aggregation.html`;
|
|
||||||
export const getCronUrl = () => `${esBase}/trigger-schedule.html#_cron_expressions`;
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
/*
|
||||||
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||||
|
* or more contributor license agreements. Licensed under the Elastic License
|
||||||
|
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||||
|
* 2.0.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import type { DocLinksStart } from 'src/core/public';
|
||||||
|
|
||||||
|
export let documentationLinks: DocLinksStart['links'];
|
||||||
|
|
||||||
|
export const init = (docLinks: DocLinksStart) => {
|
||||||
|
documentationLinks = docLinks.links;
|
||||||
|
};
|
|
@ -11,17 +11,6 @@ export { showApiError, showApiWarning } from './api_errors';
|
||||||
|
|
||||||
export { listBreadcrumb, createBreadcrumb } from './breadcrumbs';
|
export { listBreadcrumb, createBreadcrumb } from './breadcrumbs';
|
||||||
|
|
||||||
export {
|
|
||||||
setEsBaseAndXPackBase,
|
|
||||||
getLogisticalDetailsUrl,
|
|
||||||
getDateHistogramDetailsUrl,
|
|
||||||
getDateHistogramAggregationUrl,
|
|
||||||
getTermsDetailsUrl,
|
|
||||||
getHistogramDetailsUrl,
|
|
||||||
getMetricsDetailsUrl,
|
|
||||||
getCronUrl,
|
|
||||||
} from './documentation_links';
|
|
||||||
|
|
||||||
export { filterItems } from './filter_items';
|
export { filterItems } from './filter_items';
|
||||||
|
|
||||||
export { flattenPanelTree } from './flatten_panel_tree';
|
export { flattenPanelTree } from './flatten_panel_tree';
|
||||||
|
@ -47,3 +36,5 @@ export { sortTable } from './sort_table';
|
||||||
export { retypeMetrics } from './retype_metrics';
|
export { retypeMetrics } from './retype_metrics';
|
||||||
|
|
||||||
export { METRIC_TYPE } from './track_ui_metric';
|
export { METRIC_TYPE } from './track_ui_metric';
|
||||||
|
|
||||||
|
export { init } from './documentation_links';
|
||||||
|
|
|
@ -21,7 +21,7 @@ import { ManagementSetup } from '../../../../src/plugins/management/public';
|
||||||
import { IndexManagementPluginSetup } from '../../index_management/public';
|
import { IndexManagementPluginSetup } from '../../index_management/public';
|
||||||
import { IndexPatternManagementSetup } from '../../../../src/plugins/index_pattern_management/public';
|
import { IndexPatternManagementSetup } from '../../../../src/plugins/index_pattern_management/public';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { setEsBaseAndXPackBase, setHttp } from './crud_app/services/index';
|
import { setHttp, init as initDocumentation } from './crud_app/services/index';
|
||||||
import { setNotifications, setFatalErrors, setUiStatsReporter } from './kibana_services';
|
import { setNotifications, setFatalErrors, setUiStatsReporter } from './kibana_services';
|
||||||
import { UsageCollectionSetup } from '../../../../src/plugins/usage_collection/public';
|
import { UsageCollectionSetup } from '../../../../src/plugins/usage_collection/public';
|
||||||
|
|
||||||
|
@ -108,6 +108,6 @@ export class RollupPlugin implements Plugin {
|
||||||
start(core: CoreStart) {
|
start(core: CoreStart) {
|
||||||
setHttp(core.http);
|
setHttp(core.http);
|
||||||
setNotifications(core.notifications);
|
setNotifications(core.notifications);
|
||||||
setEsBaseAndXPackBase(core.docLinks.ELASTIC_WEBSITE_URL, core.docLinks.DOC_LINK_VERSION);
|
initDocumentation(core.docLinks);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { setHttp } from '../../crud_app/services';
|
import { setHttp, init as initDocumentation } from '../../crud_app/services';
|
||||||
import { mockHttpRequest, pageHelpers, nextTick } from './helpers';
|
import { mockHttpRequest, pageHelpers, nextTick } from './helpers';
|
||||||
import { JOB_TO_CLONE, JOB_CLONE_INDEX_PATTERN_CHECK } from './helpers/constants';
|
import { JOB_TO_CLONE, JOB_CLONE_INDEX_PATTERN_CHECK } from './helpers/constants';
|
||||||
import { coreMock } from '../../../../../../src/core/public/mocks';
|
import { coreMock, docLinksServiceMock } from '../../../../../../src/core/public/mocks';
|
||||||
|
|
||||||
jest.mock('lodash', () => ({
|
jest.mock('lodash', () => ({
|
||||||
...jest.requireActual('lodash'),
|
...jest.requireActual('lodash'),
|
||||||
|
@ -31,6 +31,7 @@ describe('Cloning a rollup job through create job wizard', () => {
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
startMock = coreMock.createStart();
|
startMock = coreMock.createStart();
|
||||||
setHttp(startMock.http);
|
setHttp(startMock.http);
|
||||||
|
initDocumentation(docLinksServiceMock.createStartContract());
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
|
|
||||||
import moment from 'moment-timezone';
|
import moment from 'moment-timezone';
|
||||||
|
|
||||||
import { setHttp } from '../../crud_app/services';
|
import { setHttp, init as initDocumentation } from '../../crud_app/services';
|
||||||
import { mockHttpRequest, pageHelpers } from './helpers';
|
import { mockHttpRequest, pageHelpers } from './helpers';
|
||||||
import { coreMock } from '../../../../../../src/core/public/mocks';
|
import { docLinksServiceMock, coreMock } from '../../../../../../src/core/public/mocks';
|
||||||
|
|
||||||
jest.mock('lodash', () => ({
|
jest.mock('lodash', () => ({
|
||||||
...jest.requireActual('lodash'),
|
...jest.requireActual('lodash'),
|
||||||
|
@ -30,6 +30,7 @@ describe('Create Rollup Job, step 2: Date histogram', () => {
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
startMock = coreMock.createStart();
|
startMock = coreMock.createStart();
|
||||||
setHttp(startMock.http);
|
setHttp(startMock.http);
|
||||||
|
initDocumentation(docLinksServiceMock.createStartContract());
|
||||||
});
|
});
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
// Set "default" mock responses by not providing any arguments
|
// Set "default" mock responses by not providing any arguments
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { setHttp } from '../../crud_app/services';
|
import { setHttp, init as initDocumentation } from '../../crud_app/services';
|
||||||
import { mockHttpRequest, pageHelpers } from './helpers';
|
import { mockHttpRequest, pageHelpers } from './helpers';
|
||||||
import { coreMock } from '../../../../../../src/core/public/mocks';
|
import { coreMock, docLinksServiceMock } from '../../../../../../src/core/public/mocks';
|
||||||
|
|
||||||
jest.mock('lodash', () => ({
|
jest.mock('lodash', () => ({
|
||||||
...jest.requireActual('lodash'),
|
...jest.requireActual('lodash'),
|
||||||
|
@ -29,6 +29,7 @@ describe('Create Rollup Job, step 4: Histogram', () => {
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
startMock = coreMock.createStart();
|
startMock = coreMock.createStart();
|
||||||
setHttp(startMock.http);
|
setHttp(startMock.http);
|
||||||
|
initDocumentation(docLinksServiceMock.createStartContract());
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
|
|
@ -6,9 +6,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { indexPatterns } from '../../../../../../src/plugins/data/public';
|
import { indexPatterns } from '../../../../../../src/plugins/data/public';
|
||||||
import { setHttp } from '../../crud_app/services';
|
import { setHttp, init as initDocumentation } from '../../crud_app/services';
|
||||||
import { mockHttpRequest, pageHelpers } from './helpers';
|
import { mockHttpRequest, pageHelpers } from './helpers';
|
||||||
import { coreMock } from '../../../../../../src/core/public/mocks';
|
import { coreMock, docLinksServiceMock } from '../../../../../../src/core/public/mocks';
|
||||||
|
|
||||||
jest.mock('lodash', () => ({
|
jest.mock('lodash', () => ({
|
||||||
...jest.requireActual('lodash'),
|
...jest.requireActual('lodash'),
|
||||||
|
@ -28,6 +28,7 @@ describe('Create Rollup Job, step 1: Logistics', () => {
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
startMock = coreMock.createStart();
|
startMock = coreMock.createStart();
|
||||||
setHttp(startMock.http);
|
setHttp(startMock.http);
|
||||||
|
initDocumentation(docLinksServiceMock.createStartContract());
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { setHttp } from '../../crud_app/services';
|
import { setHttp, init as initDocumentation } from '../../crud_app/services';
|
||||||
import { mockHttpRequest, pageHelpers } from './helpers';
|
import { mockHttpRequest, pageHelpers } from './helpers';
|
||||||
import { coreMock } from '../../../../../../src/core/public/mocks';
|
import { coreMock, docLinksServiceMock } from '../../../../../../src/core/public/mocks';
|
||||||
|
|
||||||
jest.mock('lodash', () => ({
|
jest.mock('lodash', () => ({
|
||||||
...jest.requireActual('lodash'),
|
...jest.requireActual('lodash'),
|
||||||
|
@ -29,6 +29,7 @@ describe('Create Rollup Job, step 5: Metrics', () => {
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
startMock = coreMock.createStart();
|
startMock = coreMock.createStart();
|
||||||
setHttp(startMock.http);
|
setHttp(startMock.http);
|
||||||
|
initDocumentation(docLinksServiceMock.createStartContract());
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { setHttp } from '../../crud_app/services';
|
import { setHttp, init as initDocumentation } from '../../crud_app/services';
|
||||||
import { pageHelpers, mockHttpRequest } from './helpers';
|
import { pageHelpers, mockHttpRequest } from './helpers';
|
||||||
import { coreMock } from '../../../../../../src/core/public/mocks';
|
import { coreMock, docLinksServiceMock } from '../../../../../../src/core/public/mocks';
|
||||||
|
|
||||||
jest.mock('lodash', () => ({
|
jest.mock('lodash', () => ({
|
||||||
...jest.requireActual('lodash'),
|
...jest.requireActual('lodash'),
|
||||||
|
@ -28,6 +28,7 @@ describe('Create Rollup Job, step 3: Terms', () => {
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
startMock = coreMock.createStart();
|
startMock = coreMock.createStart();
|
||||||
setHttp(startMock.http);
|
setHttp(startMock.http);
|
||||||
|
initDocumentation(docLinksServiceMock.createStartContract());
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
|
Loading…
Reference in a new issue