Code Review
/
portal
/
nonrtric-controlpanel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Tweaks for Policy Control UI
[portal/nonrtric-controlpanel.git]
/
webapp-frontend
/
src
/
app
/
policy
/
policy-control.component.spec.ts
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
(file)
--- 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 { 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<PolicyControlComponent>;
describe("PolicyControlComponent", () => {
let component: PolicyControlComponent;
let fixture: ComponentFixture<PolicyControlComponent>;
+ let loader: HarnessLoader;
beforeEach(async(() => {
const policyServiceSpy = jasmine.createSpyObj("PolicyService", [
beforeEach(async(() => {
const policyServiceSpy = jasmine.createSpyObj("PolicyService", [
@@
-57,6
+61,7
@@
describe("PolicyControlComponent", () => {
fixture = TestBed.createComponent(PolicyControlComponent);
component = fixture.componentInstance;
fixture.detectChanges();
fixture = TestBed.createComponent(PolicyControlComponent);
component = fixture.componentInstance;
fixture.detectChanges();
+ loader = TestbedHarnessEnvironment.loader(fixture);
});
it("should create", () => {
});
it("should create", () => {
@@
-72,4
+77,11
@@
describe("PolicyControlComponent", () => {
expect(typeComponents[0].policyTypeId).toEqual("type1");
expect(typeComponents[1].policyTypeId).toEqual("type2");
});
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" })
+ );
+
+ })*/
});
});