Skip to content

Commit

Permalink
addresses comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dplumlee committed Aug 17, 2020
1 parent 5ef03ec commit 4cf0023
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe('When the add exception modal is opened', () => {
}));
(useAddOrUpdateException as jest.Mock).mockImplementation(() => [
{ isLoading: false },
() => {},
jest.fn(),
]);
(useFetchOrCreateRuleExceptionList as jest.Mock).mockImplementation(() => [
false,
Expand Down Expand Up @@ -96,8 +96,8 @@ describe('When the add exception modal is opened', () => {
ruleIndices={[]}
ruleName={ruleName}
exceptionListType={'endpoint'}
onCancel={() => {}}
onConfirm={() => {}}
onCancel={jest.fn()}
onConfirm={jest.fn()}
/>
</ThemeProvider>
);
Expand All @@ -117,8 +117,8 @@ describe('When the add exception modal is opened', () => {
ruleIndices={['filebeat-*']}
ruleName={ruleName}
exceptionListType={'endpoint'}
onCancel={() => {}}
onConfirm={() => {}}
onCancel={jest.fn()}
onConfirm={jest.fn()}
/>
</ThemeProvider>
);
Expand Down Expand Up @@ -157,8 +157,8 @@ describe('When the add exception modal is opened', () => {
ruleIndices={['filebeat-*']}
ruleName={ruleName}
exceptionListType={'endpoint'}
onCancel={() => {}}
onConfirm={() => {}}
onCancel={jest.fn()}
onConfirm={jest.fn()}
alertData={alertDataMock}
/>
</ThemeProvider>
Expand Down Expand Up @@ -208,8 +208,8 @@ describe('When the add exception modal is opened', () => {
ruleIndices={['filebeat-*']}
ruleName={ruleName}
exceptionListType={'detection'}
onCancel={() => {}}
onConfirm={() => {}}
onCancel={jest.fn()}
onConfirm={jest.fn()}
alertData={alertDataMock}
/>
</ThemeProvider>
Expand Down Expand Up @@ -276,8 +276,8 @@ describe('When the add exception modal is opened', () => {
ruleIndices={['filebeat-*']}
ruleName={ruleName}
exceptionListType={'endpoint'}
onCancel={() => {}}
onConfirm={() => {}}
onCancel={jest.fn()}
onConfirm={jest.fn()}
alertData={alertDataMock}
/>
</ThemeProvider>
Expand All @@ -290,7 +290,6 @@ describe('When the add exception modal is opened', () => {
wrapper.find('button[data-test-subj="add-exception-confirm-button"]').getDOMNode()
).not.toBeDisabled();
});

it('should render the exception builder', () => {
expect(wrapper.find('[data-test-subj="alert-exception-builder"]').exists()).toBeTruthy();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe('When the edit exception modal is opened', () => {
});
(useAddOrUpdateException as jest.Mock).mockImplementation(() => [
{ isLoading: false },
() => {},
jest.fn(),
]);
(useFetchIndexPatterns as jest.Mock).mockImplementation(() => [
{
Expand Down Expand Up @@ -86,8 +86,8 @@ describe('When the edit exception modal is opened', () => {
ruleIndices={[]}
ruleName={ruleName}
exceptionListType={'endpoint'}
onCancel={() => {}}
onConfirm={() => {}}
onCancel={jest.fn()}
onConfirm={jest.fn()}
exceptionItem={getExceptionListItemSchemaMock()}
/>
</ThemeProvider>
Expand All @@ -114,8 +114,8 @@ describe('When the edit exception modal is opened', () => {
ruleIndices={['filebeat-*']}
ruleName={ruleName}
exceptionListType={'endpoint'}
onCancel={() => {}}
onConfirm={() => {}}
onCancel={jest.fn()}
onConfirm={jest.fn()}
exceptionItem={exceptionItemMock}
/>
</ThemeProvider>
Expand Down Expand Up @@ -156,8 +156,8 @@ describe('When the edit exception modal is opened', () => {
ruleIndices={['filebeat-*']}
ruleName={ruleName}
exceptionListType={'endpoint'}
onCancel={() => {}}
onConfirm={() => {}}
onCancel={jest.fn()}
onConfirm={jest.fn()}
exceptionItem={getExceptionListItemSchemaMock()}
/>
</ThemeProvider>
Expand Down Expand Up @@ -199,8 +199,8 @@ describe('When the edit exception modal is opened', () => {
ruleIndices={['filebeat-*']}
ruleName={ruleName}
exceptionListType={'detection'}
onCancel={() => {}}
onConfirm={() => {}}
onCancel={jest.fn()}
onConfirm={jest.fn()}
exceptionItem={getExceptionListItemSchemaMock()}
/>
</ThemeProvider>
Expand Down Expand Up @@ -238,8 +238,8 @@ describe('When the edit exception modal is opened', () => {
ruleIndices={['filebeat-*']}
ruleName={ruleName}
exceptionListType={'detection'}
onCancel={() => {}}
onConfirm={() => {}}
onCancel={jest.fn()}
onConfirm={jest.fn()}
exceptionItem={exceptionItemMock}
/>
</ThemeProvider>
Expand Down

0 comments on commit 4cf0023

Please sign in to comment.