diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/__mocks__/content_sources.mock.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/__mocks__/content_sources.mock.ts
index 750434e11d035..e7b4e543b5eb8 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/__mocks__/content_sources.mock.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/__mocks__/content_sources.mock.ts
@@ -110,6 +110,7 @@ export const fullContentSources = [
groups,
custom: false,
isIndexedSource: true,
+ isSyncConfigEnabled: true,
areThumbnailsConfigEnabled: true,
accessToken: '123token',
urlField: 'myLink',
@@ -131,6 +132,7 @@ export const fullContentSources = [
indexing: defaultIndexing,
custom: true,
isIndexedSource: true,
+ isSyncConfigEnabled: true,
areThumbnailsConfigEnabled: true,
accessToken: '123token',
urlField: 'url',
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/source_sub_nav.test.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/source_sub_nav.test.tsx
index 3a2930e2792ee..d5ba030e582b8 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/source_sub_nav.test.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/source_sub_nav.test.tsx
@@ -90,7 +90,7 @@ describe('useSourceSubNav', () => {
it('returns extra nav items for synchronization', () => {
setMockValues({
isOrganization: true,
- contentSource: { id: '2', isIndexedSource: true, name: 'foo' },
+ contentSource: { id: '2', isIndexedSource: true, name: 'foo', isSyncConfigEnabled: true },
});
expect(useSourceSubNav()).toEqual([
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/blocked_window_tab.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/blocked_window_tab.tsx
index 240abc9d7b74e..474bf4cab2a8e 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/blocked_window_tab.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/blocked_window_tab.tsx
@@ -41,8 +41,8 @@ export const BlockedWindows: React.FC = () => {
const blockedWindowItems = (
<>
- {blockedWindows.map((blockedWindow) => (
-
+ {blockedWindows.map((blockedWindow, i) => (
+
))}
{ADD_LABEL}
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/synchronization.test.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/synchronization.test.tsx
index 30b27515bfef1..632af08611ca9 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/synchronization.test.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/synchronization/synchronization.test.tsx
@@ -5,19 +5,29 @@
* 2.0.
*/
+import { setMockValues } from '../../../../../__mocks__/kea_logic';
+
import React from 'react';
import { shallow } from 'enzyme';
-import { EuiLink, EuiSwitch } from '@elastic/eui';
+import { EuiLink, EuiCallOut, EuiSwitch } from '@elastic/eui';
import { Synchronization } from './synchronization';
describe('Synchronization', () => {
- it('renders', () => {
+ it('renders when config enabled', () => {
+ setMockValues({ contentSource: { isSyncConfigEnabled: true } });
const wrapper = shallow();
expect(wrapper.find(EuiLink)).toHaveLength(1);
expect(wrapper.find(EuiSwitch)).toHaveLength(1);
});
+
+ it('renders when config disabled', () => {
+ setMockValues({ contentSource: { isSyncConfigEnabled: false } });
+ const wrapper = shallow();
+
+ expect(wrapper.find(EuiCallOut)).toHaveLength(1);
+ });
});