Skip to content
Snippets Groups Projects
Commit 51b9881a authored by Isaac Evavold's avatar Isaac Evavold
Browse files

fix compilation errors in spec files

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