Skip to content

Commit

Permalink
[Remote clusters] Cloud deployment form when adding new cluster (#94450)
Browse files Browse the repository at this point in the history
* Implemented in-form Cloud deployment url input

* Fixed i18n files and added mode switch back for non-Cloud

* Added cloud docs link to the documentation service, fixed snapshot tests

* Fixed docs build

* Added jest test for the new cloud url input

* Added unit test for cloud validation

* Fixed eslint error

* Fixed ts errors

* Added ts-ignore

* Fixed ts errors

* Refactored connection mode component and component tests

* Fixed import

* Fixed copy

* Fixed copy

* Reverted docs changes

* Reverted docs changes

* Replaced the screenshot with a popover and refactored integration tests

* Added todo for cloud deployments link

* Changed cloud URL help text copy

* Added cloud base url and deleted unnecessary base path

* Fixed es error

* Fixed es error

* Changed wording

* Reverted docs changes

* Updated the help popover

* Deleted unneeded fragment component

* Deleted unneeded fragment component

* Updated tests descriptions to be more detailed

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
yuliacech and kibanamachine authored Apr 8, 2021
1 parent 03a51f4 commit 0316787
Show file tree
Hide file tree
Showing 45 changed files with 2,184 additions and 3,503 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* 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 React from 'react';
import { registerTestBed } from '@kbn/test/jest';

import { RemoteClusterAdd } from '../../../public/application/sections';
import { createRemoteClustersStore } from '../../../public/application/store';
import { AppRouter, registerRouter } from '../../../public/application/services';
import { createRemoteClustersActions } from '../helpers';
import { AppContextProvider } from '../../../public/application/app_context';

const ComponentWithContext = ({ isCloudEnabled }: { isCloudEnabled: boolean }) => {
return (
<AppContextProvider context={{ isCloudEnabled, cloudBaseUrl: 'test.com' }}>
<RemoteClusterAdd />
</AppContextProvider>
);
};

const testBedConfig = ({ isCloudEnabled }: { isCloudEnabled: boolean }) => {
return {
store: createRemoteClustersStore,
memoryRouter: {
onRouter: (router: AppRouter) => registerRouter(router),
},
defaultProps: { isCloudEnabled },
};
};

const initTestBed = (isCloudEnabled: boolean) =>
registerTestBed(ComponentWithContext, testBedConfig({ isCloudEnabled }))();

export const setup = async (isCloudEnabled = false) => {
const testBed = await initTestBed(isCloudEnabled);

return {
...testBed,
actions: {
...createRemoteClustersActions(testBed),
},
};
};

This file was deleted.

Loading

0 comments on commit 0316787

Please sign in to comment.