X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=webapp-frontend%2Fsrc%2Fapp%2Fpolicy%2Fpolicy-control.component.spec.ts;h=4109dbd9359efacc2380220bb944933555f14b0e;hb=90295c9a25c27628164eed0c66d0a89df587525b;hp=05f95db32d18f437f206eba2ff94d0e5158e78f4;hpb=4e4cb3f185fd507708266621227326fdce816a47;p=portal%2Fnonrtric-controlpanel.git diff --git a/webapp-frontend/src/app/policy/policy-control.component.spec.ts b/webapp-frontend/src/app/policy/policy-control.component.spec.ts index 05f95db..4109dbd 100644 --- a/webapp-frontend/src/app/policy/policy-control.component.spec.ts +++ b/webapp-frontend/src/app/policy/policy-control.component.spec.ts @@ -30,10 +30,14 @@ import { PolicyTypes } from "@interfaces/policy.types"; import { PolicyService } from "@services/policy/policy.service"; import { MockComponent } from "ng-mocks"; import { PolicyTypeComponent } from "./policy-type/policy-type.component"; +import { MatButtonHarness } from '@angular/material/button/testing'; +import { HarnessLoader } from '@angular/cdk/testing'; +import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; describe("PolicyControlComponent", () => { let component: PolicyControlComponent; let fixture: ComponentFixture; + let loader: HarnessLoader; beforeEach(async(() => { const policyServiceSpy = jasmine.createSpyObj("PolicyService", [ @@ -57,6 +61,7 @@ describe("PolicyControlComponent", () => { fixture = TestBed.createComponent(PolicyControlComponent); component = fixture.componentInstance; fixture.detectChanges(); + loader = TestbedHarnessEnvironment.loader(fixture); }); it("should create", () => { @@ -72,4 +77,11 @@ describe("PolicyControlComponent", () => { expect(typeComponents[0].policyTypeId).toEqual("type1"); expect(typeComponents[1].policyTypeId).toEqual("type2"); }); + + /*it("should reload when clicking on refresh button", async () => { + let refreshButton: MatButtonHarness = await loader.getHarness( + MatButtonHarness.with({ selector: "#refreshButton" }) + ); + + })*/ });