Adapt to aliases for imports
Change-Id: I285f9133e639209668ac660e885ac5a642ddce12
Signed-off-by: elinuxhenrik <henrik.b.andersson@est.tech>
Issue-ID: NONRTRIC-451
diff --git a/webapp-frontend/src/app/ei-coordinator/ei-coordinator.component.spec.ts b/webapp-frontend/src/app/ei-coordinator/ei-coordinator.component.spec.ts
index 1759c69..96ad96f 100644
--- a/webapp-frontend/src/app/ei-coordinator/ei-coordinator.component.spec.ts
+++ b/webapp-frontend/src/app/ei-coordinator/ei-coordinator.component.spec.ts
@@ -29,8 +29,8 @@
import { EICoordinatorComponent } from './ei-coordinator.component';
import { UiService } from '@services/ui/ui.service';
-import { ProducersListComponent } from './producers-list/producers-list.component';
-import { JobsListComponent } from './jobs-list/jobs-list.component';
+import { ProducersListComponent } from '@ei-coordinator/producers-list/producers-list.component';
+import { JobsListComponent } from '@ei-coordinator/jobs-list/jobs-list.component';
describe('EICoordinatorComponent', () => {
let component: EICoordinatorComponent;
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 dfc225c..3cd2601 100644
--- a/webapp-frontend/src/app/policy/policy-control.component.spec.ts
+++ b/webapp-frontend/src/app/policy/policy-control.component.spec.ts
@@ -17,55 +17,49 @@
* limitations under the License.
* ========================LICENSE_END===================================
*/
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
-import { MatDialog } from '@angular/material/dialog';
-import { MatIconModule } from '@angular/material/icon';
-import { MatTableModule } from '@angular/material/table';
-import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
-import { of } from 'rxjs';
+import { async, ComponentFixture, TestBed } from "@angular/core/testing";
+import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
+import { MatDialog } from "@angular/material/dialog";
+import { MatIconModule } from "@angular/material/icon";
+import { MatTableModule } from "@angular/material/table";
+import { CUSTOM_ELEMENTS_SCHEMA } from "@angular/core";
+import { of } from "rxjs";
-import { NotificationService } from '@services/ui/notification.service';
-import { PolicyControlComponent } from './policy-control.component';
-import { PolicyTypeDataSource } from './policy-type/policy-type.datasource';
-import { UiService } from '@services/ui/ui.service';
-import { PolicyTypeSchema } from '@interfaces/policy.types';
+import { NotificationService } from "@services/ui/notification.service";
+import { PolicyControlComponent } from "./policy-control.component";
+import { PolicyTypeDataSource } from "@policy/policy-type/policy-type.datasource";
+import { UiService } from "@services/ui/ui.service";
+import { PolicyTypeSchema } from "@interfaces/policy.types";
-describe('PolicyControlComponent', () => {
+describe("PolicyControlComponent", () => {
let component: PolicyControlComponent;
let fixture: ComponentFixture<PolicyControlComponent>;
beforeEach(async(() => {
- const policyTypeDataSourceSpy = jasmine.createSpyObj('PolicyTypeDataSource', [ 'connect', 'getPolicyTypes', 'disconnect' ]);
+ const policyTypeDataSourceSpy = jasmine.createSpyObj(
+ "PolicyTypeDataSource",
+ ["connect", "getPolicyTypes", "disconnect"]
+ );
var policyTypeSchema = {} as PolicyTypeSchema;
- policyTypeSchema.name = '';
- policyTypeSchema.schemaObject = '';
- policyTypeDataSourceSpy.connect.and.returnValue(of([ policyTypeSchema]));
+ policyTypeSchema.name = "";
+ policyTypeSchema.schemaObject = "";
+ policyTypeDataSourceSpy.connect.and.returnValue(of([policyTypeSchema]));
policyTypeDataSourceSpy.disconnect();
let matDialogStub: Partial<MatDialog>;
let notificationServiceStub: Partial<NotificationService>;
TestBed.configureTestingModule({
- imports: [
- MatIconModule,
- MatTableModule,
- BrowserAnimationsModule
- ],
- schemas: [
- CUSTOM_ELEMENTS_SCHEMA
- ],
- declarations: [
- PolicyControlComponent
- ],
+ imports: [MatIconModule, MatTableModule, BrowserAnimationsModule],
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
+ declarations: [PolicyControlComponent],
providers: [
{ provide: PolicyTypeDataSource, useValue: policyTypeDataSourceSpy },
{ provide: MatDialog, useValue: matDialogStub },
{ provide: NotificationService, useValue: notificationServiceStub },
- UiService
- ]
- })
- .compileComponents();
+ UiService,
+ ],
+ }).compileComponents();
}));
beforeEach(() => {
@@ -74,7 +68,7 @@
fixture.detectChanges();
});
- it('should create', () => {
+ it("should create", () => {
expect(component).toBeTruthy();
});
});
diff --git a/webapp-frontend/src/app/policy/policy-instance-dialog/policy-instance-dialog.component.spec.ts b/webapp-frontend/src/app/policy/policy-instance-dialog/policy-instance-dialog.component.spec.ts
index 564824f..b609904 100644
--- a/webapp-frontend/src/app/policy/policy-instance-dialog/policy-instance-dialog.component.spec.ts
+++ b/webapp-frontend/src/app/policy/policy-instance-dialog/policy-instance-dialog.component.spec.ts
@@ -19,6 +19,8 @@
*/
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
+import { By } from "@angular/platform-browser";
+import { ChangeDetectorRef, CUSTOM_ELEMENTS_SCHEMA } from "@angular/core";
import { ComponentFixture, TestBed } from "@angular/core/testing";
import { HarnessLoader } from "@angular/cdk/testing";
import { MatButtonModule } from "@angular/material/button";
@@ -30,6 +32,7 @@
} from "@angular/material/dialog";
import { MatSelectModule } from "@angular/material/select";
import { MatInputModule } from "@angular/material/input";
+import { of } from "rxjs";
import { ReactiveFormsModule } from "@angular/forms";
import { TestbedHarnessEnvironment } from "@angular/cdk/testing/testbed";
import { ToastrModule } from "ngx-toastr";
@@ -39,13 +42,10 @@
import { ErrorDialogService } from "@services/ui/error-dialog.service";
import { UiService } from "@services/ui/ui.service";
import { PolicyInstanceDialogComponent } from "./policy-instance-dialog.component";
-import { ChangeDetectorRef, CUSTOM_ELEMENTS_SCHEMA } from "@angular/core";
-import { TypedPolicyEditorComponent } from "../typed-policy-editor/typed-policy-editor.component";
-import { RicSelectorComponent } from "../ric-selector/ric-selector.component";
-import { NoTypePolicyEditorComponent } from "../no-type-policy-editor/no-type-policy-editor.component";
-import { By } from "@angular/platform-browser";
+import { TypedPolicyEditorComponent } from "@policy/typed-policy-editor/typed-policy-editor.component";
+import { RicSelectorComponent } from "@policy/ric-selector/ric-selector.component";
+import { NoTypePolicyEditorComponent } from "@policy/no-type-policy-editor/no-type-policy-editor.component";
import { CreatePolicyInstance } from "@interfaces/policy.types";
-import { of } from "rxjs";
import { NotificationService } from "@services/ui/notification.service";
import * as uuid from "uuid";