Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Error: Error in ./ReturnFileParameterComponent class ReturnFileParameterComponent - inline template:2:4 caused by: undefined is not a constructor (evaluating 'this.documentResponsiveListener()') in C:/Users/wlaw/Desktop/ens_fits_ui/karma-shim.js (line 41475)
- ngOnDestroy@C:/Users/wlaw/Desktop/ens_fits_ui/karma-shim.js:71991:45 <- webpack:///~/primeng/components/confirmdialog/confirmdialog.js:140:0
- ngOnDestroy
- destroyInternal
- destroy@C:/Users/wlaw/Desktop/ens_fits_ui/karma-shim.js:41076:34 <- webpack:///~/@angular/core/bundles/core.umd.js:12361:0
- ...
- import {
- ...
- ConfirmDialogModule,
- ConfirmationService
- } from 'primeng/primeng';
- describe('Return File Parameter Component Test', () => {
- beforeEach(() => {
- TestBed.configureTestingModule({
- declarations: [ReturnFileParameterComponent, HtmlUserFriendlyTimePipe, Html24HourDatePipe, DayOfWeekPipe],
- providers: [
- ...
- ConfirmationService,
- ...
- ],
- imports: [
- ...
- ConfirmDialogModule
- ]
- });
- TestBed.compileComponents();
- });
- ...
- it('should call add on a new Return File Parameter and submit it to the service', inject(
- [ReturnFileParameterComponent, AuthHelper],
- (component: ReturnFileParameterComponent, authHelper: AuthHelper) => {
- let fixture: ComponentFixture<ReturnFileParameterComponent> =
- getTestBed().createComponent(ReturnFileParameterComponent);
- fixture.componentInstance.ngOnInit()
- .then(fixture.detectChanges)
- .then(function () {
- let newParam = fixture.componentInstance.add();
- expect(fixture.componentInstance.selectedParam).toBe(newParam);
- expect(fixture.componentInstance.editParam).toBe(true);
- });
- })
- );
- });
- <div class="ui-grid-row" id="return-parameter-table">
- <h5>Return File Parameters</h5>
- <p-growl [value]="msgs" life="3000"></p-growl>
- <p-confirmDialog header="Confirmation" icon="fa fa-question-circle" width="425"></p-confirmDialog>
- ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement