Skip to content

Commit

Permalink
[Workplace Search] Hide integration tiles for service not launching w…
Browse files Browse the repository at this point in the history
…ith 8.3.0 (#134931) (#135015)

(cherry picked from commit be71c90)

Co-authored-by: Byron Hulcher <[email protected]>
  • Loading branch information
kibanamachine and Byron Hulcher authored Jun 23, 2022
1 parent 9df12f2 commit 9ee96d7
Show file tree
Hide file tree
Showing 14 changed files with 7 additions and 116 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function ({ getService }: FtrProviderContext) {

expect(resp.body).to.be.an('array');

expect(resp.body.length).to.be(42);
expect(resp.body.length).to.be(39);

// Test for sample data card
expect(resp.body.findIndex((c: { id: string }) => c.id === 'sample_data_all')).to.be.above(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,12 @@ import jiraServer from './jira_server.svg';
import loadingSmall from './loading_small.svg';
import networkDrive from './network_drive.svg';
import oneDrive from './onedrive.svg';
import outlook from './outlook.svg';
import salesforce from './salesforce.svg';
import serviceNow from './servicenow.svg';
import sharePoint from './sharepoint.svg';
import sharePointServer from './sharepoint_server.svg';
import slack from './slack.svg';
import teams from './teams.svg';
import zendesk from './zendesk.svg';
import zoom from './zoom.svg';

export const images = {
box,
Expand All @@ -48,14 +45,11 @@ export const images = {
loadingSmall,
networkDrive,
oneDrive,
outlook,
salesforce,
salesforceSandbox: salesforce,
serviceNow,
sharePoint,
sharePointServer,
slack,
teams,
zendesk,
zoom,
} as { [key: string]: string };

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('AvailableSourcesList', () => {
const wrapper = shallow(<AvailableSourcesList sources={mergedAvailableSources} />);

expect(wrapper.find(EuiTitle)).toHaveLength(1);
expect(wrapper.find('[data-test-subj="AvailableSourceListItem"]')).toHaveLength(26);
expect(wrapper.find('[data-test-subj="AvailableSourceListItem"]')).toHaveLength(23);
expect(wrapper.find('[data-test-subj="CustomAPISourceLink"]')).toHaveLength(1);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ describe('ConfiguredSourcesList', () => {
it('renders', () => {
const wrapper = shallow(<ConfiguredSourcesList {...props} />);

expect(wrapper.find('[data-test-subj="UnConnectedTooltip"]')).toHaveLength(22);
expect(wrapper.find('[data-test-subj="UnConnectedTooltip"]')).toHaveLength(19);
expect(wrapper.find('[data-test-subj="AccountOnlyTooltip"]')).toHaveLength(2);
expect(wrapper.find('[data-test-subj="ConfiguredSourcesListItem"]')).toHaveLength(25);
expect(wrapper.find('[data-test-subj="ConfiguredSourcesListItem"]')).toHaveLength(22);
});

it('shows connect button for an source with multiple connector options that routes to choice page', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ describe('ConnectInstance', () => {
redirectFormCreated();
});

const credentialsSourceData = staticSourceData[16]; // service_now
const credentialsSourceData = staticSourceData[15]; // service_now
const oauthSourceData = staticSourceData[0]; // box
const subdomainSourceData = staticSourceData[22]; // zendesk
const subdomainSourceData = staticSourceData[20]; // zendesk

const props = {
...credentialsSourceData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -474,25 +474,6 @@ export const staticSourceData: SourceDataItem[] = [
},
accountContextOnly: false,
},
{
name: SOURCE_NAMES.OUTLOOK,
categories: [
SOURCE_CATEGORIES.COMMUNICATION,
SOURCE_CATEGORIES.PRODUCTIVITY,
SOURCE_CATEGORIES.MICROSOFT,
],
serviceType: 'custom',
baseServiceType: 'outlook',
configuration: {
isPublicKey: false,
hasOauthRedirect: false,
needsBaseUrl: false,
documentationUrl: docLinks.workplaceSearchOutlook,
applicationPortalUrl: '',
githubRepository: 'elastic/enterprise-search-outlook-connector',
},
accountContextOnly: false,
},
{
name: SOURCE_NAMES.SALESFORCE,
serviceType: 'salesforce',
Expand Down Expand Up @@ -721,25 +702,6 @@ export const staticSourceData: SourceDataItem[] = [
},
accountContextOnly: true,
},
{
name: SOURCE_NAMES.TEAMS,
categories: [
SOURCE_CATEGORIES.COMMUNICATION,
SOURCE_CATEGORIES.PRODUCTIVITY,
SOURCE_CATEGORIES.MICROSOFT,
],
serviceType: 'custom',
baseServiceType: 'teams',
configuration: {
isPublicKey: false,
hasOauthRedirect: false,
needsBaseUrl: false,
documentationUrl: docLinks.workplaceSearchTeams,
applicationPortalUrl: '',
githubRepository: 'elastic/enterprise-search-teams-connector',
},
accountContextOnly: false,
},
{
name: SOURCE_NAMES.ZENDESK,
serviceType: 'zendesk',
Expand Down Expand Up @@ -774,21 +736,6 @@ export const staticSourceData: SourceDataItem[] = [
},
accountContextOnly: false,
},
{
name: SOURCE_NAMES.ZOOM,
categories: [SOURCE_CATEGORIES.COMMUNICATION, SOURCE_CATEGORIES.PRODUCTIVITY],
serviceType: 'custom',
baseServiceType: 'zoom',
configuration: {
isPublicKey: false,
hasOauthRedirect: false,
needsBaseUrl: false,
documentationUrl: docLinks.workplaceSearchZoom,
applicationPortalUrl: '',
githubRepository: 'elastic/enterprise-search-zoom-connector',
},
accountContextOnly: false,
},
staticGenericExternalSourceData,
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ describe('SourcesLogic', () => {
it('availableSources & configuredSources have correct length', () => {
SourcesLogic.actions.onInitializeSources(serverResponse);

expect(SourcesLogic.values.availableSources).toHaveLength(17);
expect(SourcesLogic.values.availableSources).toHaveLength(14);
expect(SourcesLogic.values.configuredSources).toHaveLength(5);
});
it('externalConfigured is set to true if external is configured', () => {
Expand Down

This file was deleted.

Loading

0 comments on commit 9ee96d7

Please sign in to comment.