diff --git a/src/components/SemanticField/SemanticField.test.js b/src/components/SemanticField/SemanticField.test.js new file mode 100644 index 00000000..e1cfefbc --- /dev/null +++ b/src/components/SemanticField/SemanticField.test.js @@ -0,0 +1,20 @@ +/** + * @jest-environment jsdom + */ + +import { render } from '@testing-library/react'; +import { Formik } from 'formik'; +import SemanticField from './SemanticField'; + +test('renders semantic field', async () => { + const { getByRole } = render( + + + , + ); + const field = getByRole('textbox'); + expect(field).toBeInTheDocument(); +}); diff --git a/src/components/SlateMediaEmbedElement/SlateMediaEmbedElement.js b/src/components/SlateMediaEmbedElement/SlateMediaEmbedElement.js index 032eb576..c3c962a7 100644 --- a/src/components/SlateMediaEmbedElement/SlateMediaEmbedElement.js +++ b/src/components/SlateMediaEmbedElement/SlateMediaEmbedElement.js @@ -15,6 +15,7 @@ const SlateMediaEmbedElement = ({ title="embed" src={`${url}`} frameBorder="0" + data-testid="slate-iframe" /> diff --git a/src/components/SlateMediaEmbedElement/SlateMediaEmbedElement.test.js b/src/components/SlateMediaEmbedElement/SlateMediaEmbedElement.test.js new file mode 100644 index 00000000..f68b7e54 --- /dev/null +++ b/src/components/SlateMediaEmbedElement/SlateMediaEmbedElement.test.js @@ -0,0 +1,19 @@ +/** + * @jest-environment jsdom + */ + +import { render } from '@testing-library/react'; +import { Formik } from 'formik'; +import SlateMediaEmbedElement from './SlateMediaEmbedElement'; + +test('renders slate media embed element', async () => { + const { getByTestId } = render( + + + , + ); + const elem = getByTestId('slate-iframe'); + expect(elem).toBeInTheDocument(); +});