From 51b9881a2e616ebaba017c9d95a79e28a034c6a5 Mon Sep 17 00:00:00 2001
From: ievavold <ievavold@wisc.edu>
Date: Wed, 20 Feb 2019 14:22:16 -0600
Subject: [PATCH] fix compilation errors in spec files

---
 src/app/core/header/header.component.spec.ts  |  35 ++-
 .../navigation/navigation.component.spec.ts   |  31 ++-
 .../course-item/course-item.component.spec.ts |   3 +-
 .../term-container.component.spec.ts          |  11 +-
 .../course-details.component.spec.ts          | 210 +++++++++---------
 5 files changed, 138 insertions(+), 152 deletions(-)

diff --git a/src/app/core/header/header.component.spec.ts b/src/app/core/header/header.component.spec.ts
index a680cde..2cb2f24 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 8dcba49..e745662 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 cbb11f3..3ac79a9 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 f9ff77b..b32934b 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 f5e3214..20fb6ca 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();
+  });
 });
-- 
GitLab