Files
frontend-app-ora-grading/src/containers/ListView/EmptySubmission.test.jsx
Ben Warzeski 6c9673cc06 feat: Demo flag (#89)
* fix: preserve gradingData on navigation

* feat: demo linking and clear-all on close review

* fix: fix assets url

* chore: update snapshot

* fix: update routing for images

* fix: update snapshot
2022-04-05 15:11:20 -04:00

34 lines
860 B
JavaScript

import React from 'react';
import { shallow } from 'enzyme';
import { Hyperlink } from '@edx/paragon';
import urls from 'data/services/lms/urls';
import EmptySubmission from './EmptySubmission';
jest.mock('data/services/lms/urls', () => ({
openResponse: (courseId) => `openResponseUrl(${courseId})`,
}));
jest.mock('./assets/emptyState.svg', () => './assets/emptyState.svg');
let el;
describe('EmptySubmission component', () => {
describe('component', () => {
const props = { courseId: 'test-course-id' };
beforeEach(() => {
el = shallow(<EmptySubmission {...props} />);
});
test('snapshot', () => {
expect(el).toMatchSnapshot();
});
test('openResponse destination', () => {
expect(
el.find(Hyperlink).at(0).props().destination,
).toEqual(urls.openResponse(props.courseId));
});
});
});