2 * ========================LICENSE_START=================================
5 * Copyright (C) 2020 Nordix Foundation
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ========================LICENSE_END===================================
21 import { async, ComponentFixture } from "@angular/core/testing";
22 import { PolicyService } from "@app/services/policy/policy.service";
23 import { PolicyInstanceComponent } from "./policy-instance.component";
25 describe("PolicyInstanceComponent", () => {
26 let component: PolicyInstanceComponent;
27 let fixture: ComponentFixture<PolicyInstanceComponent>;
29 // beforeEach(async(() => {
30 // policyDataSourceSpy = jasmine.createSpyObj("PolicyInstanceDataSource", ["getPolicyType"]);
31 // const policyTypeSchema = JSON.parse(
32 // '{"title": "1", "description": "Type 1 policy type"}'
34 // const policyType = { policy_schema: policyTypeSchema } as PolicyType;
35 // policyDataSourceSpy.getPolicyType.and.returnValue(of(policyType));
37 // TestBed.configureTestingModule({
39 // PolicyTypeComponent,
40 // MockComponent(PolicyInstanceComponent),
42 // providers: [{ provide: PolicyService, useValue: policyDataSourceSpy }],
43 // }).compileComponents();
47 // fixture = TestBed.createComponent(PolicyTypeComponent);
48 // component = fixture.componentInstance;
49 // fixture.detectChanges();
52 // it("should create", () => {
53 // expect(component).toBeTruthy();