Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
YulNaumenko committed Jul 9, 2020
1 parent 78c3683 commit 76b129f
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/
import React from 'react';
import { mountWithIntl } from 'test_utils/enzyme_helpers';
import { DocLinksStart } from 'kibana/public';
import EmailParamsFields from './email_params';

describe('EmailParamsFields renders', () => {
Expand All @@ -22,6 +23,7 @@ describe('EmailParamsFields renders', () => {
errors={{ to: [], cc: [], bcc: [], subject: [], message: [] }}
editAction={() => {}}
index={0}
docLinks={{ ELASTIC_WEBSITE_URL: '', DOC_LINK_VERSION: '' } as DocLinksStart}
/>
);
expect(wrapper.find('[data-test-subj="toEmailAddressInput"]').length > 0).toBeTruthy();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import React from 'react';
import { mountWithIntl } from 'test_utils/enzyme_helpers';
import ParamsFields from './es_index_params';
import { DocLinksStart } from 'kibana/public';

describe('IndexParamsFields renders', () => {
test('all params fields is rendered', () => {
Expand All @@ -18,6 +19,7 @@ describe('IndexParamsFields renders', () => {
errors={{ index: [] }}
editAction={() => {}}
index={0}
docLinks={{ ELASTIC_WEBSITE_URL: '', DOC_LINK_VERSION: '' } as DocLinksStart}
/>
);
expect(wrapper.find('[data-test-subj="documentsJsonEditor"]').first().prop('value')).toBe(`{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import React from 'react';
import { mountWithIntl } from 'test_utils/enzyme_helpers';
import { EventActionOptions, SeverityActionOptions } from '.././types';
import PagerDutyParamsFields from './pagerduty_params';
import { DocLinksStart } from 'kibana/public';

describe('PagerDutyParamsFields renders', () => {
test('all params fields is rendered', () => {
Expand All @@ -27,6 +28,7 @@ describe('PagerDutyParamsFields renders', () => {
errors={{ summary: [], timestamp: [] }}
editAction={() => {}}
index={0}
docLinks={{ ELASTIC_WEBSITE_URL: '', DOC_LINK_VERSION: '' } as DocLinksStart}
/>
);
expect(wrapper.find('[data-test-subj="severitySelect"]').length > 0).toBeTruthy();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import React from 'react';
import { mountWithIntl } from 'test_utils/enzyme_helpers';
import { ServerLogLevelOptions } from '.././types';
import ServerLogParamsFields from './server_log_params';
import { DocLinksStart } from 'kibana/public';

describe('ServerLogParamsFields renders', () => {
test('all params fields is rendered', () => {
Expand All @@ -21,6 +22,7 @@ describe('ServerLogParamsFields renders', () => {
editAction={() => {}}
index={0}
defaultMessage={'test default message'}
docLinks={{ ELASTIC_WEBSITE_URL: '', DOC_LINK_VERSION: '' } as DocLinksStart}
/>
);
expect(wrapper.find('[data-test-subj="loggingLevelSelect"]').length > 0).toBeTruthy();
Expand All @@ -41,6 +43,7 @@ describe('ServerLogParamsFields renders', () => {
errors={{ message: [] }}
editAction={() => {}}
index={0}
docLinks={{ ELASTIC_WEBSITE_URL: '', DOC_LINK_VERSION: '' } as DocLinksStart}
/>
);
expect(wrapper.find('[data-test-subj="loggingLevelSelect"]').length > 0).toBeTruthy();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import React from 'react';
import { mountWithIntl } from 'test_utils/enzyme_helpers';
import ServiceNowParamsFields from './servicenow_params';
import { DocLinksStart } from 'kibana/public';

describe('ServiceNowParamsFields renders', () => {
test('all params fields is rendered', () => {
Expand All @@ -29,6 +30,7 @@ describe('ServiceNowParamsFields renders', () => {
editAction={() => {}}
index={0}
messageVariables={[]}
docLinks={{ ELASTIC_WEBSITE_URL: '', DOC_LINK_VERSION: '' } as DocLinksStart}
/>
);
expect(wrapper.find('[data-test-subj="urgencySelect"]').length > 0).toBeTruthy();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import React from 'react';
import { mountWithIntl } from 'test_utils/enzyme_helpers';
import SlackParamsFields from './slack_params';
import { DocLinksStart } from 'kibana/public';

describe('SlackParamsFields renders', () => {
test('all params fields is rendered', () => {
Expand All @@ -18,6 +19,7 @@ describe('SlackParamsFields renders', () => {
errors={{ message: [] }}
editAction={() => {}}
index={0}
docLinks={{ ELASTIC_WEBSITE_URL: '', DOC_LINK_VERSION: '' } as DocLinksStart}
/>
);
expect(wrapper.find('[data-test-subj="messageTextArea"]').length > 0).toBeTruthy();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import React from 'react';
import { mountWithIntl } from 'test_utils/enzyme_helpers';
import WebhookParamsFields from './webhook_params';
import { DocLinksStart } from 'kibana/public';

describe('WebhookParamsFields renders', () => {
test('all params fields is rendered', () => {
Expand All @@ -18,6 +19,7 @@ describe('WebhookParamsFields renders', () => {
errors={{ body: [] }}
editAction={() => {}}
index={0}
docLinks={{ ELASTIC_WEBSITE_URL: '', DOC_LINK_VERSION: '' } as DocLinksStart}
/>
);
expect(wrapper.find('[data-test-subj="bodyJsonEditor"]').length > 0).toBeTruthy();
Expand Down

0 comments on commit 76b129f

Please sign in to comment.