This is an automated email from the ASF dual-hosted git repository.

zrhoffman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new 5504398757 Fix TPv2 unit tests downloading a blank file (#7916)
5504398757 is described below

commit 55043987574b008e32cd35524b6d274abf3f00bd
Author: ocket8888 <[email protected]>
AuthorDate: Fri Jan 19 10:22:05 2024 -0700

    Fix TPv2 unit tests downloading a blank file (#7916)
    
    Fix tests downloading a blank file
---
 .../isogeneration-form.component.spec.ts           | 23 ++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)

diff --git 
a/experimental/traffic-portal/src/app/core/misc/isogeneration-form/isogeneration-form.component.spec.ts
 
b/experimental/traffic-portal/src/app/core/misc/isogeneration-form/isogeneration-form.component.spec.ts
index 036511dbad..53dbd4536a 100644
--- 
a/experimental/traffic-portal/src/app/core/misc/isogeneration-form/isogeneration-form.component.spec.ts
+++ 
b/experimental/traffic-portal/src/app/core/misc/isogeneration-form/isogeneration-form.component.spec.ts
@@ -31,6 +31,7 @@ import {
        TypeService
 } from "src/app/api";
 import { APITestingModule } from "src/app/api/testing";
+import { FileUtilsService } from "src/app/shared/file-utils.service";
 import { SharedModule } from "src/app/shared/shared.module";
 
 import { ISOGenerationFormComponent } from "./isogeneration-form.component";
@@ -72,14 +73,24 @@ describe("ISOGenerationFormComponent", () => {
                                SharedModule,
                                NoopAnimationsModule
                        ],
-                       providers: [{
-                               provide: "Window",
-                               useValue: {
-                                       open: (): void => {
-                                               // do nothing
+                       providers: [
+                               {
+                                       provide: "Window",
+                                       useValue: {
+                                               open: (): void => {
+                                                       // do nothing
+                                               }
+                                       }
+                               },
+                               {
+                                       provide: FileUtilsService,
+                                       useValue: {
+                                               download: (): void => {
+                                                       // do nothing
+                                               }
                                        }
                                }
-                       }]
+                       ]
                }).compileComponents();
 
                fixture = TestBed.createComponent(ISOGenerationFormComponent);

Reply via email to