Skip to content

Commit

Permalink
Update tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
CJ Cenizal committed Jul 27, 2022
1 parent a8f8755 commit dedac7c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,16 @@ describe('Processor: Grok', () => {
const {
actions: { saveNewProcessor },
form,
exists,
} = testBed;

// Click submit button with only the type defined
await saveNewProcessor();

// Expect form error as "field" is a required parameter
expect(form.getErrorsMessages()).toEqual(['A field value is required.']);
// Patterns field is also required; it uses EuiDraggable and only shows an error icon when invalid
expect(exists('droppableList.errorIcon')).toBe(true);
expect(form.getErrorsMessages()).toEqual([
'A field value is required.', // "Field" input
'A value is required.', // First input in "Patterns" list
]);
});

test('saves with default parameter values', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ type TestSubject =
| 'copyFromInput'
| 'trimSwitch.input'
| 'droppableList.addButton'
| 'droppableList.errorIcon'
| 'droppableList.input-0'
| 'droppableList.input-1'
| 'droppableList.input-2';

0 comments on commit dedac7c

Please sign in to comment.