Files
frontend-app-authoring/src/editors/EditorPage.test.jsx
Ben Warzeski cb1c00bf3c Feat: Video skeleton (#58)
* pt1

* feat: video skeleton

* fix: update tests

* chore: update snapshots and linting

* fix: fix image context button

* feat: re-usable editor pattern

* fix: css and bad hook
2022-04-14 15:01:04 -04:00

28 lines
870 B
JavaScript

import React from 'react';
import { shallow } from 'enzyme';
import EditorPage from './EditorPage';
const props = {
courseId: 'course-v1:edX+DemoX+Demo_Course',
blockType: 'html',
blockId: 'block-v1:edX+DemoX+Demo_Course+type@html+block@030e35c4756a4ddc8d40b95fbbfff4d4',
lmsEndpointUrl: 'evenfakerurl.com',
studioEndpointUrl: 'fakeurl.com',
onClose: jest.fn().mockName('props.onClose'),
};
jest.mock('react-redux', () => ({
Provider: 'Provider',
}));
jest.mock('./Editor', () => 'Editor');
describe('Editor Page', () => {
describe('snapshots', () => {
test('rendering correctly with expected Input', () => {
expect(shallow(<EditorPage {...props} />)).toMatchSnapshot();
});
test('props besides blockType default to null', () => {
expect(shallow(<EditorPage blockType={props.blockType} />)).toMatchSnapshot();
});
});
});