Skip to content

Commit

Permalink
Fixed failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
YulNaumenko committed Nov 4, 2020
1 parent 239712e commit 850a030
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,7 @@ describe('alert_add', () => {
expect(wrapper.find('[data-test-subj="addAlertFlyoutTitle"]').exists()).toBeTruthy();
expect(wrapper.find('[data-test-subj="saveAlertButton"]').exists()).toBeTruthy();

wrapper.find('[data-test-subj="alertTypesComboBox"]').first().simulate('click');
wrapper.find('.euiSelect').first().simulate('click');

expect(wrapper.contains('Metadata: some value. Fields: test.')).toBeTruthy();
wrapper.find('[data-test-subj="my-alert-type-SelectOption"]').first().simulate('click');

expect(wrapper.find('input#alertName').props().value).toBe('');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,8 @@ describe('alert_form', () => {

it('renders registered selected alert type', async () => {
await setup();
wrapper.find('[data-test-subj="my-alert-type-SelectOption"]');
wrapper.find('[data-test-subj="alertTypesComboBox"]').first().simulate('click');
expect(wrapper.find('.euiSelect').length > 0).toBeTruthy();
const alertTypeSelectOptions = wrapper.find('[data-test-subj="my-alert-type-SelectOption"]');
expect(alertTypeSelectOptions.exists()).toBeTruthy();
});

it('does not render registered alert type which non editable', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ export const AlertForm = ({
.map((item, index) => (
<Fragment key={index}>
<EuiListGroupItem
data-test-subj={`${item.id}-SelectOption`}
label={
<EuiDescriptionList>
<EuiDescriptionListTitle>{item.name}</EuiDescriptionListTitle>
Expand Down

0 comments on commit 850a030

Please sign in to comment.