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:
Bilal Qamar
2024-02-15 14:51:25 +05:00
110 changed files with 1044 additions and 1232 deletions

View File

@@ -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();
});
});

View File

@@ -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();
});
});