Skip to content

Commit

Permalink
fixed unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
gmmorris committed Nov 26, 2020
1 parent f2bd0e0 commit 6ab8d4d
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { ValidationResult, Alert, AlertAction } from '../../../types';
import ActionForm from './action_form';
import { RecoveredActionGroup } from '../../../../../alerts/common';
import { useKibana } from '../../../common/lib/kibana';
import { EuiScreenReaderOnly } from '@elastic/eui';
jest.mock('../../../common/lib/kibana');
jest.mock('../../lib/action_connector_api', () => ({
loadAllActions: jest.fn(),
Expand Down Expand Up @@ -387,9 +388,11 @@ describe('action_form', () => {
},
]
`);
expect(actionGroupsSelect.first().text()).toEqual(
'Select an option: Recovered, is selectedResolved'

expect(actionGroupsSelect.first().find(EuiScreenReaderOnly).text()).toEqual(
'Select an option: Recovered, is selected'
);
expect(actionGroupsSelect.first().find('button').first().text()).toEqual('Recovered');
});

it('renders available connectors for the selected action type', async () => {
Expand Down

0 comments on commit 6ab8d4d

Please sign in to comment.