Skip to content

Commit

Permalink
PR changes 2
Browse files Browse the repository at this point in the history
  • Loading branch information
stephmilovic committed May 4, 2020
1 parent 92b1d00 commit 3a954a1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
import React from 'react';
import { mount } from 'enzyme';

import { ServiceNowColumn } from './columns';
import { ExternalServiceColumn } from './columns';

import { useGetCasesMockState } from '../../../../containers/case/mock';

describe('ServiceNowColumn ', () => {
describe('ExternalServiceColumn ', () => {
it('Not pushed render', () => {
const wrapper = mount(
<ServiceNowColumn {...{ theCase: useGetCasesMockState.data.cases[0] }} />
<ExternalServiceColumn {...{ theCase: useGetCasesMockState.data.cases[0] }} />
);
expect(
wrapper
Expand All @@ -25,7 +25,7 @@ describe('ServiceNowColumn ', () => {
});
it('Up to date', () => {
const wrapper = mount(
<ServiceNowColumn {...{ theCase: useGetCasesMockState.data.cases[1] }} />
<ExternalServiceColumn {...{ theCase: useGetCasesMockState.data.cases[1] }} />
);
expect(
wrapper
Expand All @@ -36,7 +36,7 @@ describe('ServiceNowColumn ', () => {
});
it('Needs update', () => {
const wrapper = mount(
<ServiceNowColumn {...{ theCase: useGetCasesMockState.data.cases[2] }} />
<ExternalServiceColumn {...{ theCase: useGetCasesMockState.data.cases[2] }} />
);
expect(
wrapper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export const getCasesColumns = (
name: i18n.EXTERNAL_INCIDENT,
render: (theCase: Case) => {
if (theCase.id != null) {
return <ServiceNowColumn theCase={theCase} />;
return <ExternalServiceColumn theCase={theCase} />;
}
return getEmptyTagValue();
},
Expand All @@ -180,7 +180,7 @@ interface Props {
theCase: Case;
}

export const ServiceNowColumn: React.FC<Props> = ({ theCase }) => {
export const ExternalServiceColumn: React.FC<Props> = ({ theCase }) => {
const handleRenderDataToPush = useCallback(() => {
const lastCaseUpdate = theCase.updatedAt != null ? new Date(theCase.updatedAt) : null;
const lastCasePush =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const EditConnector = React.memo(
setIsEditConnector(true);
}, []);

const onCancelConnector = useCallback(async () => {
const onCancelConnector = useCallback(() => {
form.setFieldValue('connector', selectedConnector);
setIsEditConnector(false);
}, [form, selectedConnector]);
Expand Down

0 comments on commit 3a954a1

Please sign in to comment.