mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Workplace Search] Add source skips config step correctly (#128715)
This commit is contained in:
parent
43ad6e2597
commit
bf2769d7ee
2 changed files with 6 additions and 3 deletions
|
@ -81,7 +81,10 @@ describe('AddSourceList', () => {
|
|||
configured: true,
|
||||
};
|
||||
shallow(<AddSource sourceData={sourceData} />);
|
||||
expect(initializeAddSource).toHaveBeenCalledWith(expect.objectContaining({ connect: true }));
|
||||
expect(initializeAddSource).toHaveBeenNthCalledWith(
|
||||
2,
|
||||
expect.objectContaining({ connect: true })
|
||||
);
|
||||
});
|
||||
|
||||
it('renders default state correctly when there are multiple connector options', () => {
|
||||
|
|
|
@ -59,9 +59,9 @@ export const AddSource: React.FC<AddSourceProps> = (props) => {
|
|||
// We can land on this page from a choice page for multiple types of connectors
|
||||
// If that's the case we want to skip the intro and configuration, if the external & internal connector have already been configured
|
||||
const goToConnect = externalConnectorAvailable && externalConfigured && configured;
|
||||
initializeAddSource(goToConnect ? props : { ...props, connect: true });
|
||||
initializeAddSource(goToConnect ? { ...props, connect: true } : props);
|
||||
return resetSourceState;
|
||||
}, []);
|
||||
}, [configured]);
|
||||
|
||||
const goToConfigurationIntro = () => setAddSourceStep(AddSourceSteps.ConfigIntroStep);
|
||||
const goToSaveConfig = () => setAddSourceStep(AddSourceSteps.SaveConfigStep);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue