diff --git a/src/app/core/header/header.component.spec.ts b/src/app/core/header/header.component.spec.ts index a680cde931a3203ea51d454e8936f3e04327b7cc..2cb2f2429f9cfe86c88b68d5a3eaeeb5eb16e557 100644 --- a/src/app/core/header/header.component.spec.ts +++ b/src/app/core/header/header.component.spec.ts @@ -4,24 +4,23 @@ import { HeaderComponent } from './header.component'; import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; describe('HeaderComponent', () => { - let component: HeaderComponent; - let fixture: ComponentFixture<HeaderComponent>; + let component: HeaderComponent; + let fixture: ComponentFixture<HeaderComponent>; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [HeaderComponent], - schemas: [ CUSTOM_ELEMENTS_SCHEMA ] - }) - .compileComponents(); - })); + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [HeaderComponent], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }).compileComponents(); + })); - beforeEach(() => { - fixture = TestBed.createComponent(HeaderComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); + beforeEach(() => { + fixture = TestBed.createComponent(HeaderComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); - it('should create', () => { - expect(component).toBeTruthy(); - }); -}) \ No newline at end of file + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/core/navigation/navigation.component.spec.ts b/src/app/core/navigation/navigation.component.spec.ts index 8dcba49aa1ddb6e02f4dad224da0c19f87dbf11a..e745662142ffad363abef295cadeceffcceb43a9 100644 --- a/src/app/core/navigation/navigation.component.spec.ts +++ b/src/app/core/navigation/navigation.component.spec.ts @@ -3,23 +3,22 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { NavigationComponent } from './navigation.component'; describe('NavigationComponent', () => { - let component: NavigationComponent; - let fixture: ComponentFixture<NavigationComponent>; + let component: NavigationComponent; + let fixture: ComponentFixture<NavigationComponent>; - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ NavigationComponent ] - }) - .compileComponents(); - })); + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [NavigationComponent], + }).compileComponents(); + })); - beforeEach(() => { - fixture = TestBed.createComponent(NavigationComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); + beforeEach(() => { + fixture = TestBed.createComponent(NavigationComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); - it('should create', () => { - expect(component).toBeTruthy(); - }); + it('should create', () => { + expect(component).toBeTruthy(); + }); }); diff --git a/src/app/degree-planner/shared/course-item/course-item.component.spec.ts b/src/app/degree-planner/shared/course-item/course-item.component.spec.ts index cbb11f378edd2b621180c44bb718fe490e69dcd7..3ac79a98431b739e553e44b2da731ec084e788c0 100644 --- a/src/app/degree-planner/shared/course-item/course-item.component.spec.ts +++ b/src/app/degree-planner/shared/course-item/course-item.component.spec.ts @@ -30,9 +30,10 @@ describe('CourseItemComponent', () => { fixture = TestBed.createComponent(CourseItemComponent); component = fixture.componentInstance; const course: Course = { + studentEnrollmentStatus: 'Enrolled', id: null, courseId: '022973', - termCode: null, + termCode: '1234', topicId: 0, title: 'A Wisconsin Experience Seminar', subjectCode: '270', diff --git a/src/app/degree-planner/term-container/term-container.component.spec.ts b/src/app/degree-planner/term-container/term-container.component.spec.ts index f9ff77b57717d5ccf4a97215c6b4700bfc3f282e..b32934bf40b6458a30ab3721394ae3063908c76f 100644 --- a/src/app/degree-planner/term-container/term-container.component.spec.ts +++ b/src/app/degree-planner/term-container/term-container.component.spec.ts @@ -35,18 +35,11 @@ describe('TermContainerComponent', () => { termComponent = fixture.componentInstance; const term: PlannedTerm = { termCode: '1194', + era: 'active', note: undefined, courses: [], }; - termComponent.term = term; - const notes: Note[] = [ - { - id: 323, - termCode: '1174', - note: 'teset', - }, - ]; - + termComponent.term$ = of(term); fixture.detectChanges(); }); diff --git a/src/app/shared/components/course-details/course-details.component.spec.ts b/src/app/shared/components/course-details/course-details.component.spec.ts index f5e32149d5288fdea10684a531cdb593e0c27b7f..20fb6caa6b2c4e84afaee577f6a968f0d0df56f0 100644 --- a/src/app/shared/components/course-details/course-details.component.spec.ts +++ b/src/app/shared/components/course-details/course-details.component.spec.ts @@ -9,115 +9,109 @@ import { MAT_DIALOG_DATA } from '@angular/material'; import { CourseDetails } from '@app/core/models/course-details'; describe('CourseDetailsComponent', () => { - let component: CourseDetailsComponent; - let fixture: ComponentFixture<CourseDetailsComponent>; + let component: CourseDetailsComponent; + let fixture: ComponentFixture<CourseDetailsComponent>; - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [CoreModule, SharedModule, HttpClientModule], - providers: [ { provide: MAT_DIALOG_DATA, useValue: {} }] - }) - .compileComponents(); - })); + beforeEach(async(() => { + TestBed.configureTestingModule({ + imports: [CoreModule, SharedModule, HttpClientModule], + providers: [{ provide: MAT_DIALOG_DATA, useValue: {} }], + }).compileComponents(); + })); - beforeEach(() => { - fixture = TestBed.createComponent(CourseDetailsComponent); - component = fixture.componentInstance; - const courseDetails: CourseDetails = { - 'termCode': '1194', - 'courseId': '011615', - 'subject': { - 'termCode': '1194', - 'subjectCode': '600', - 'description': 'MATHEMATICS', - 'shortDescription': 'MATH', - 'formalDescription': 'MATHEMATICS', - 'undergraduateCatalogURI': 'http://pubs.wisc.edu/ug/ls_math.htm', - 'graduateCatalogURI': 'http://grad.wisc.edu/catalog/degrees_math.htm', - 'departmentURI': 'https://www.math.wisc.edu/', - 'uddsFundingSource': 'A4854', - 'schoolCollege': { - 'academicOrgCode': 'L', - 'academicGroupCode': 'L&S', - 'shortDescription': 'Letters and Science', - 'formalDescription': 'Letters and Science, College of', - 'uddsCode': null, - 'schoolCollegeURI': 'http://www.ls.wisc.edu/' - }, - 'footnotes': [ - '' - ] - }, - 'catalogNumber': '141', - 'approvedForTopics': false, - 'topics': [ ], - 'minimumCredits': 3, - 'maximumCredits': 3, - 'creditRange': '3', - 'firstTaught': '0974', - 'lastTaught': '1192', - 'typicallyOffered': 'Fall, Spring', - 'generalEd': { - 'code': 'QR-A', - 'description': 'Quantitative Reasoning Part A' - }, - 'ethnicStudies': null, - 'breadths': [ ], - 'lettersAndScienceCredits': { - 'code': 'C', - 'description': 'Counts as LAS credit (L&S)' - }, - 'workplaceExperience': null, - 'foreignLanguage': null, - 'honors': null, - 'levels': [ - { - 'code': 'E', - 'description': 'Elementary' - } - ], - 'openToFirstYear': false, - 'advisoryPrerequisites': null, - 'enrollmentPrerequisites': 'MATH 96 or placement into MATH 141. MATH 118 does not fulfill the requisite', - 'allCrossListedSubjects': [ ], - 'title': 'Quantitative Reasoning and Problem Solving', - 'description': '', - 'catalogPrintFlag': false, - 'academicGroupCode': null, - 'currentlyTaught': true, - 'gradingBasis': { - 'code': 'OPT', - 'description': 'Student Option' - }, - 'repeatable': 'N', - 'gradCourseWork': null, - 'instructorProvidedContent': null, - 'courseRequirements': { - '013562=': [ - 55720 - ] - }, - 'courseDesignation': 'MATH 141', - 'courseDesignationRaw': 'MATH 141', - 'fullCourseDesignation': 'MATHEMATICS 141', - 'fullCourseDesignationRaw': 'MATHEMATICS 141', - 'lastUpdated': 1543905958133, - 'catalogSort': '00141', - 'subjectAggregate': 'MATHEMATICS 600', - 'titleSuggest': { - 'input': [ - 'Quantitative Reasoning and Problem Solving' - ], - 'payload': { - 'courseId': '011615' - } - } - }; - component.courseDetails = courseDetails; - fixture.detectChanges(); - }); + beforeEach(() => { + fixture = TestBed.createComponent(CourseDetailsComponent); + component = fixture.componentInstance; + const courseDetails: CourseDetails = { + termCode: '1194', + courseId: '011615', + subject: { + termCode: '1194', + subjectCode: '600', + description: 'MATHEMATICS', + shortDescription: 'MATH', + formalDescription: 'MATHEMATICS', + undergraduateCatalogURI: 'http://pubs.wisc.edu/ug/ls_math.htm', + graduateCatalogURI: 'http://grad.wisc.edu/catalog/degrees_math.htm', + departmentURI: 'https://www.math.wisc.edu/', + uddsFundingSource: 'A4854', + schoolCollege: { + academicOrgCode: 'L', + academicGroupCode: 'L&S', + shortDescription: 'Letters and Science', + formalDescription: 'Letters and Science, College of', + uddsCode: null, + schoolCollegeURI: 'http://www.ls.wisc.edu/', + }, + footnotes: [''], + }, + catalogNumber: '141', + approvedForTopics: false, + topics: [], + minimumCredits: 3, + maximumCredits: 3, + creditRange: '3', + firstTaught: '0974', + lastTaught: '1192', + typicallyOffered: 'Fall, Spring', + generalEd: { + code: 'QR-A', + description: 'Quantitative Reasoning Part A', + }, + ethnicStudies: null, + breadths: [], + lettersAndScienceCredits: { + code: 'C', + description: 'Counts as LAS credit (L&S)', + }, + workplaceExperience: null, + foreignLanguage: null, + honors: null, + levels: [ + { + code: 'E', + description: 'Elementary', + }, + ], + openToFirstYear: false, + advisoryPrerequisites: null, + enrollmentPrerequisites: + 'MATH 96 or placement into MATH 141. MATH 118 does not fulfill the requisite', + allCrossListedSubjects: [], + title: 'Quantitative Reasoning and Problem Solving', + description: '', + catalogPrintFlag: false, + academicGroupCode: null, + currentlyTaught: true, + gradingBasis: { + code: 'OPT', + description: 'Student Option', + }, + repeatable: 'N', + gradCourseWork: false, + instructorProvidedContent: null, + courseRequirements: { + '013562=': [55720], + }, + courseDesignation: 'MATH 141', + courseDesignationRaw: 'MATH 141', + fullCourseDesignation: 'MATHEMATICS 141', + fullCourseDesignationRaw: 'MATHEMATICS 141', + lastUpdated: 1543905958133, + catalogSort: '00141', + subjectAggregate: 'MATHEMATICS 600', + titleSuggest: { + input: ['Quantitative Reasoning and Problem Solving'], + payload: { + courseId: '011615', + }, + }, + }; + component.courseDetails = courseDetails; + fixture.detectChanges(); + }); - it('should create', () => { - expect(component).toBeTruthy(); - }); + it('should create', () => { + expect(component).toBeTruthy(); + }); });