Skip to content

Commit

Permalink
Fix types/tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron Hulcher committed May 9, 2022
1 parent 2ebac49 commit 61ac6fe
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 28 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ import { EuiText, EuiTitle } from '@elastic/eui';
import { ConfigurationIntro } from './configuration_intro';

describe('ConfigurationIntro', () => {
const advanceStep = jest.fn();
const props = {
header: <h1>Header</h1>,
name: 'foo',
advanceStep,
advanceStepTo: '',
};

it('renderscontext', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('ConfigureOauth', () => {
const onFormCreated = jest.fn();
const getPreContentSourceConfigData = jest.fn();
const setSelectedGithubOrganizations = jest.fn();
const createContentSource = jest.fn((_, formSubmitSuccess, handleFormSubmitError) => {
const createContentSource = jest.fn((formSubmitSuccess, handleFormSubmitError) => {
formSubmitSuccess();
handleFormSubmitError();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,8 @@ export const ConfigureOauth: React.FC<ConfigureOauthProps> = ({ name, onFormCrea

const { getPreContentSourceConfigData, setSelectedGithubOrganizations, createContentSource } =
useActions(AddSourceLogic);
const {
currentServiceType,
githubOrganizations,
selectedGithubOrganizationsMap,
sectionLoading,
} = useValues(AddSourceLogic);
const { githubOrganizations, selectedGithubOrganizationsMap, sectionLoading } =
useValues(AddSourceLogic);

const checkboxOptions = githubOrganizations.map((item) => ({ id: item, label: item }));

Expand All @@ -54,7 +50,7 @@ export const ConfigureOauth: React.FC<ConfigureOauthProps> = ({ name, onFormCrea
const handleFormSubmit = (e: FormEvent) => {
setFormLoading(true);
e.preventDefault();
createContentSource(currentServiceType, formSubmitSuccess, handleFormSubmitError);
createContentSource(formSubmitSuccess, handleFormSubmitError);
};

const configfieldsForm = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const SourceSettings: React.FC = () => {
const { isOrganization } = useValues(AppLogic);

useEffect(() => {
getSourceConfigData(serviceType);
getSourceConfigData();
}, []);

const isGithubApp =
Expand Down

0 comments on commit 61ac6fe

Please sign in to comment.