diff --git a/packages/react-core/src/components/TextArea/__tests__/TextArea.test.tsx b/packages/react-core/src/components/TextArea/__tests__/TextArea.test.tsx index b8d4e2fe54c..eea71ff8ff3 100644 --- a/packages/react-core/src/components/TextArea/__tests__/TextArea.test.tsx +++ b/packages/react-core/src/components/TextArea/__tests__/TextArea.test.tsx @@ -3,7 +3,7 @@ import React from 'react'; import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { TextArea, TextAreaBase } from '../TextArea'; +import { TextArea } from '../TextArea'; import { ValidatedOptions } from '../../../helpers/constants'; const props = { @@ -11,116 +11,132 @@ const props = { value: 'test textarea' }; -describe('TextArea', () => { - test('textarea passes value and event to onChange handler', async () => { - const user = userEvent.setup(); - - render(); - - await user.type(screen.getByLabelText('test textarea'), 'a'); - expect(props.onChange).toHaveBeenCalledWith('a', expect.any(Object)); - }); - - test('simple text area', () => { - const { asFragment } = render( - -`; - -exports[`TextArea disabled text area using isDisabled 1`] = ` - - - -`; - -exports[`TextArea horizontally resizable text area 1`] = ` - - - -`; - -exports[`TextArea read only text area using default readOnlyVariant 1`] = ` - - - -`; - -exports[`TextArea read only text area using isReadOnly 1`] = ` - - - -`; - -exports[`TextArea read only text area using plain readOnlyVariant 1`] = ` - - - -`; - -exports[`TextArea read only text area using readOnly 1`] = ` - - - -`; - -exports[`TextArea simple text area 1`] = ` - - - -`; - -exports[`TextArea validated text area error 1`] = ` - - - -`; - -exports[`TextArea vertically resizable text area 1`] = ` - - + style="--pf-c-form-control--textarea--Height: 6px;" + /> `;