Merge branch 'master' of https://github.com/openedx/frontend-app-learner-dashboard into mashal-m/replace-edx/paragon-frontend-build
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import { shallow } from '@edx/react-unit-test-utils';
|
||||
|
||||
import ProgramCard from './ProgramCard';
|
||||
|
||||
@@ -18,6 +18,6 @@ const props = {
|
||||
|
||||
describe('RelatedProgramsModal ProgramCard', () => {
|
||||
test('snapshot', () => {
|
||||
expect(shallow(<ProgramCard {...props} />)).toMatchSnapshot();
|
||||
expect(shallow(<ProgramCard {...props} />).snapshot).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import { shallow } from '@edx/react-unit-test-utils';
|
||||
|
||||
import { reduxHooks } from 'hooks';
|
||||
import RelatedProgramsModal from '.';
|
||||
@@ -50,11 +50,11 @@ describe('RelatedProgramsModal', () => {
|
||||
expect(reduxHooks.useCardRelatedProgramsData).toHaveBeenCalledWith(cardId);
|
||||
});
|
||||
test('snapshot: open', () => {
|
||||
expect(shallow(<RelatedProgramsModal {...props} />)).toMatchSnapshot();
|
||||
expect(shallow(<RelatedProgramsModal {...props} />).snapshot).toMatchSnapshot();
|
||||
});
|
||||
test('snapshot: closed', () => {
|
||||
expect(
|
||||
shallow(<RelatedProgramsModal {...props} isOpen={false} />),
|
||||
shallow(<RelatedProgramsModal {...props} isOpen={false} />).snapshot,
|
||||
).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user