Advertisement
Guest User

Untitled

a guest
Jan 20th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.19 KB | None | 0 0
  1. 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)
  2. ngOnDestroy@C:/Users/wlaw/Desktop/ens_fits_ui/karma-shim.js:71991:45 <- webpack:///~/primeng/components/confirmdialog/confirmdialog.js:140:0
  3. ngOnDestroy
  4. destroyInternal
  5. destroy@C:/Users/wlaw/Desktop/ens_fits_ui/karma-shim.js:41076:34 <- webpack:///~/@angular/core/bundles/core.umd.js:12361:0
  6. ...
  7.  
  8. import {
  9. ...
  10. ConfirmDialogModule,
  11. ConfirmationService
  12. } from 'primeng/primeng';
  13.  
  14.  
  15. describe('Return File Parameter Component Test', () => {
  16.  
  17. beforeEach(() => {
  18. TestBed.configureTestingModule({
  19. declarations: [ReturnFileParameterComponent, HtmlUserFriendlyTimePipe, Html24HourDatePipe, DayOfWeekPipe],
  20. providers: [
  21. ...
  22. ConfirmationService,
  23. ...
  24. ],
  25. imports: [
  26. ...
  27. ConfirmDialogModule
  28. ]
  29. });
  30. TestBed.compileComponents();
  31. });
  32.  
  33. ...
  34.  
  35. it('should call add on a new Return File Parameter and submit it to the service', inject(
  36. [ReturnFileParameterComponent, AuthHelper],
  37. (component: ReturnFileParameterComponent, authHelper: AuthHelper) => {
  38. let fixture: ComponentFixture<ReturnFileParameterComponent> =
  39. getTestBed().createComponent(ReturnFileParameterComponent);
  40.  
  41. fixture.componentInstance.ngOnInit()
  42. .then(fixture.detectChanges)
  43. .then(function () {
  44. let newParam = fixture.componentInstance.add();
  45. expect(fixture.componentInstance.selectedParam).toBe(newParam);
  46. expect(fixture.componentInstance.editParam).toBe(true);
  47. });
  48. })
  49. );
  50. });
  51.  
  52. <div class="ui-grid-row" id="return-parameter-table">
  53. <h5>Return File Parameters</h5>
  54. <p-growl [value]="msgs" life="3000"></p-growl>
  55. <p-confirmDialog header="Confirmation" icon="fa fa-question-circle" width="425"></p-confirmDialog>
  56. ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement