diff --git a/modules/web/modules/course-table/__tests__/__snapshots__/year.test.js.snap b/modules/web/modules/course-table/__tests__/__snapshots__/year.test.js.snap index e9d8c8c9c..145a79679 100644 --- a/modules/web/modules/course-table/__tests__/__snapshots__/year.test.js.snap +++ b/modules/web/modules/course-table/__tests__/__snapshots__/year.test.js.snap @@ -1,8 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Year can add a semester 1`] = ` - - @@ -18,13 +16,13 @@ exports[`Year can add a semester 1`] = ` Fall ’ - Remove Year - + @@ -32,8 +30,6 @@ exports[`Year can add a semester 1`] = ` `; exports[`Year can add a semester 2`] = ` - - @@ -49,13 +45,13 @@ exports[`Year can add a semester 2`] = ` Fall ’ - Remove Year - + @@ -63,8 +59,6 @@ exports[`Year can add a semester 2`] = ` `; exports[`Year can remove a semester 1`] = ` - - @@ -80,13 +74,13 @@ exports[`Year can remove a semester 1`] = ` Fall ’ - Remove Year - + @@ -94,8 +88,6 @@ exports[`Year can remove a semester 1`] = ` `; exports[`Year can remove a semester 2`] = ` - - @@ -111,13 +103,13 @@ exports[`Year can remove a semester 2`] = ` Fall ’ - Remove Year - + @@ -125,22 +117,20 @@ exports[`Year can remove a semester 2`] = ` `; exports[`Year renders shallowly 1`] = ` - -

2016—2017

`; diff --git a/modules/web/modules/course-table/__tests__/year.test.js b/modules/web/modules/course-table/__tests__/year.test.js index 7a98786d1..526cf6fdf 100644 --- a/modules/web/modules/course-table/__tests__/year.test.js +++ b/modules/web/modules/course-table/__tests__/year.test.js @@ -3,7 +3,6 @@ import Year from '../year' import { Student } from '../../../../../modules/object-student/student' import renderer from 'react-test-renderer' import { shallow } from 'enzyme' -import 'jest-styled-components' const mockStudent = () => Student({ @@ -28,7 +27,7 @@ test('Year renders shallowly', () => { /> ) - expect(tree).toMatchStyledComponentsSnapshot() + expect(tree).toMatchSnapshot() }) test('Year can add a semester', () => { @@ -46,14 +45,14 @@ test('Year can add a semester', () => { /> ) - expect(tree).toMatchStyledComponentsSnapshot() + expect(tree).toMatchSnapshot() tree.find({ title: 'Add Semester' }).simulate('click') expect(addSemester).toHaveBeenCalled() expect(removeYear).not.toHaveBeenCalled() - expect(tree).toMatchStyledComponentsSnapshot() + expect(tree).toMatchSnapshot() }) test('Year can remove a semester', () => { @@ -71,12 +70,12 @@ test('Year can remove a semester', () => { /> ) - expect(tree).toMatchStyledComponentsSnapshot() + expect(tree).toMatchSnapshot() tree.find({ title: 'Remove the year 2016—2017' }).simulate('click') expect(addSemester).not.toHaveBeenCalled() expect(removeYear).toHaveBeenCalled() - expect(tree).toMatchStyledComponentsSnapshot() + expect(tree).toMatchSnapshot() }) diff --git a/modules/web/modules/student/__tests__/__snapshots__/student-summary.test.js.snap b/modules/web/modules/student/__tests__/__snapshots__/student-summary.test.js.snap index 2116ace3f..2336690ad 100644 --- a/modules/web/modules/student/__tests__/__snapshots__/student-summary.test.js.snap +++ b/modules/web/modules/student/__tests__/__snapshots__/student-summary.test.js.snap @@ -1,8 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`CreditSummary handles having exactly the right number of credits 1`] = ` - -

@@ -17,8 +15,6 @@ exports[`CreditSummary handles having exactly the right number of credits 1`] = `; exports[`CreditSummary handles having fewer credits than needed 1`] = ` - -

@@ -32,8 +28,6 @@ exports[`CreditSummary handles having fewer credits than needed 1`] = ` `; exports[`CreditSummary handles having more credits than needed 1`] = ` - -

@@ -48,8 +42,6 @@ exports[`CreditSummary handles having more credits than needed 1`] = ` `; exports[`CreditSummary renders shallowly 1`] = ` - -

@@ -63,8 +55,6 @@ exports[`CreditSummary renders shallowly 1`] = ` `; exports[`DateSummary allows editing the graduation year if onChangeGraduation is given 1`] = ` - -

@@ -90,8 +80,6 @@ exports[`DateSummary allows editing the graduation year if onChangeGraduation is `; exports[`DateSummary allows editing the matriculation year if onChangeMatriculation is given 1`] = ` - -

@@ -117,8 +105,6 @@ exports[`DateSummary allows editing the matriculation year if onChangeMatriculat `; exports[`DateSummary calls onChangeGraduation when the graduation year is changed 1`] = ` - -

@@ -144,8 +130,6 @@ exports[`DateSummary calls onChangeGraduation when the graduation year is change `; exports[`DateSummary calls onChangeMatriculation when the matriculation year is changed 1`] = ` - -

@@ -171,8 +155,6 @@ exports[`DateSummary calls onChangeMatriculation when the matriculation year is `; exports[`DateSummary disables editing the graduation year if onChangeGraduation is not given 1`] = ` - -

@@ -197,8 +179,6 @@ exports[`DateSummary disables editing the graduation year if onChangeGraduation `; exports[`DateSummary disables editing the matriculation year if onChangeMatriculation is not given 1`] = ` - -

@@ -223,8 +203,6 @@ exports[`DateSummary disables editing the matriculation year if onChangeMatricul `; exports[`DateSummary handles graduating before matriculation 1`] = ` - -

@@ -249,8 +227,6 @@ exports[`DateSummary handles graduating before matriculation 1`] = ` `; exports[`DateSummary handles graduating in five years 1`] = ` - -

@@ -275,8 +251,6 @@ exports[`DateSummary handles graduating in five years 1`] = ` `; exports[`DateSummary handles graduating in four years 1`] = ` - -

@@ -301,8 +275,6 @@ exports[`DateSummary handles graduating in four years 1`] = ` `; exports[`DateSummary handles graduating in six years 1`] = ` - -

@@ -327,8 +299,6 @@ exports[`DateSummary handles graduating in six years 1`] = ` `; exports[`DateSummary handles graduating in three years 1`] = ` - -

@@ -353,8 +323,6 @@ exports[`DateSummary handles graduating in three years 1`] = ` `; exports[`DateSummary renders 1`] = ` - -

@@ -891,8 +859,6 @@ exports[`DegreeSummary handles 3 degrees, 3 majors, 3 concentrations, and 2 emph exports[`DegreeSummary handles 3 degrees, 3 majors, 3 concentrations, and 3 emphases 1`] = `"You are planning on Bachelor of Science, Bachelor of Music, and Bachelor of Arts degrees, majors in Asian Studies, Biology, and Computer Science, and concentrations in Africa and the Americas, Biomolecular Science, and China Studies, not to mention emphases in Emphasis 1, Emphasis 2, and Emphasis 3."`; exports[`DegreeSummary renders 1`] = ` - -

@@ -904,8 +870,6 @@ exports[`DegreeSummary renders 1`] = ` `; exports[`Footer handles the "can graduate" status 1`] = ` - -

@@ -914,8 +878,6 @@ exports[`Footer handles the "can graduate" status 1`] = ` `; exports[`Footer handles the "cannot graduate" status 1`] = ` - -
@@ -924,8 +886,6 @@ exports[`Footer handles the "cannot graduate" status 1`] = ` `; exports[`Footer renders 1`] = ` - -
@@ -934,8 +894,6 @@ exports[`Footer renders 1`] = ` `; exports[`Header allows editing the name if onChangeName is given 1`] = ` - -
@@ -961,8 +919,6 @@ exports[`Header allows editing the name if onChangeName is given 1`] = ` `; exports[`Header calls onChangeName when the name is changed 1`] = ` - -
@@ -988,8 +944,6 @@ exports[`Header calls onChangeName when the name is changed 1`] = ` `; exports[`Header disables editing the name if onChangeName is not given 1`] = ` - -
@@ -1014,8 +968,6 @@ exports[`Header disables editing the name if onChangeName is not given 1`] = ` `; exports[`Header renders 1`] = ` - -
@@ -1040,8 +992,6 @@ exports[`Header renders 1`] = ` `; exports[`Header with an avatar handles the "can graduate" status 1`] = ` - -
@@ -1066,8 +1016,6 @@ exports[`Header with an avatar handles the "can graduate" status 1`] = ` `; exports[`Header with an avatar handles the "cannot graduate" status 1`] = ` - -
@@ -1092,8 +1040,6 @@ exports[`Header with an avatar handles the "cannot graduate" status 1`] = ` `; exports[`Header without an avatar handles the "can graduate" status 1`] = ` - -
@@ -1114,8 +1060,6 @@ exports[`Header without an avatar handles the "can graduate" status 1`] = ` `; exports[`Header without an avatar handles the "cannot graduate" status 1`] = ` - -
@@ -1136,8 +1080,6 @@ exports[`Header without an avatar handles the "cannot graduate" status 1`] = ` `; exports[`StudentSummary renders 1`] = ` - -
@@ -1166,8 +1108,6 @@ exports[`StudentSummary renders 1`] = ` `; exports[`StudentSummary renders a student with canGraduate=false 1`] = ` - -
diff --git a/modules/web/modules/student/__tests__/student-summary.test.js b/modules/web/modules/student/__tests__/student-summary.test.js index 652cebfdc..6318ea4fc 100644 --- a/modules/web/modules/student/__tests__/student-summary.test.js +++ b/modules/web/modules/student/__tests__/student-summary.test.js @@ -9,7 +9,6 @@ import { } from '../student-summary' import { Student } from '../../../../../modules/object-student/student' import { shallow } from 'enzyme' -import 'jest-styled-components' const mockStudent = () => Student({ @@ -27,7 +26,7 @@ describe('CreditSummary', () => { ) - expect(tree).toMatchStyledComponentsSnapshot() + expect(tree).toMatchSnapshot() }) it('handles having fewer credits than needed', () => { @@ -35,7 +34,7 @@ describe('CreditSummary', () => { ) - expect(tree).toMatchStyledComponentsSnapshot() + expect(tree).toMatchSnapshot() expect(tree.text()).not.toContain('Good job!') }) @@ -44,7 +43,7 @@ describe('CreditSummary', () => { ) - expect(tree).toMatchStyledComponentsSnapshot() + expect(tree).toMatchSnapshot() expect(tree.text()).toContain('Good job!') }) @@ -53,7 +52,7 @@ describe('CreditSummary', () => { ) - expect(tree).toMatchStyledComponentsSnapshot() + expect(tree).toMatchSnapshot() expect(tree.text()).toContain('Good job!') }) }) @@ -64,37 +63,37 @@ describe('DateSummary', () => { ) - expect(tree).toMatchStyledComponentsSnapshot() + expect(tree).toMatchSnapshot() }) it('handles graduating before matriculation', () => { expect( shallow() - ).toMatchStyledComponentsSnapshot() + ).toMatchSnapshot() }) it('handles graduating in three years', () => { expect( shallow() - ).toMatchStyledComponentsSnapshot() + ).toMatchSnapshot() }) it('handles graduating in four years', () => { expect( shallow() - ).toMatchStyledComponentsSnapshot() + ).toMatchSnapshot() }) it('handles graduating in five years', () => { expect( shallow() - ).toMatchStyledComponentsSnapshot() + ).toMatchSnapshot() }) it('handles graduating in six years', () => { expect( shallow() - ).toMatchStyledComponentsSnapshot() + ).toMatchSnapshot() }) it('disables editing the matriculation year if onChangeMatriculation is not given', () => { @@ -102,7 +101,7 @@ describe('DateSummary', () => { ) - expect(tree).toMatchStyledComponentsSnapshot() + expect(tree).toMatchSnapshot() expect(tree.find('ContentEditable').at(0).prop('disabled')).toBe(true) }) @@ -111,7 +110,7 @@ describe('DateSummary', () => { ) - expect(tree).toMatchStyledComponentsSnapshot() + expect(tree).toMatchSnapshot() expect(tree.find('ContentEditable').at(1).prop('disabled')).toBe(true) }) @@ -125,7 +124,7 @@ describe('DateSummary', () => { /> ) - expect(tree).toMatchStyledComponentsSnapshot() + expect(tree).toMatchSnapshot() expect(tree.find('ContentEditable').at(0).prop('disabled')).toBe(false) }) @@ -139,7 +138,7 @@ describe('DateSummary', () => { /> ) - expect(tree).toMatchStyledComponentsSnapshot() + expect(tree).toMatchSnapshot() expect(tree.find('ContentEditable').at(1).prop('disabled')).toBe(false) }) @@ -153,7 +152,7 @@ describe('DateSummary', () => { /> ) - expect(tree).toMatchStyledComponentsSnapshot() + expect(tree).toMatchSnapshot() tree.find('ContentEditable').at(0).simulate('blur', '2010') expect(onChangeMatriculation).toHaveBeenCalledWith('2010') }) @@ -168,7 +167,7 @@ describe('DateSummary', () => { /> ) - expect(tree).toMatchStyledComponentsSnapshot() + expect(tree).toMatchSnapshot() tree.find('ContentEditable').at(1).simulate('blur', '2018') expect(onChangeGraduation).toHaveBeenCalledWith('2018') }) @@ -192,7 +191,7 @@ describe('DegreeSummary', () => { it('renders', () => { const tree = shallow() - expect(tree).toMatchStyledComponentsSnapshot() + expect(tree).toMatchSnapshot() }) for (const degreeCount of [0, 1, 2, 3]) { @@ -219,7 +218,7 @@ describe('DegreeSummary', () => { /> ) - expect(tree.text()).toMatchStyledComponentsSnapshot() + expect(tree.text()).toMatchSnapshot() }) } } @@ -233,13 +232,13 @@ describe('Footer', () => { it('renders', () => { const tree = shallow(