TSK-1838: automatic linting fixes introduced from dependency upgrades

This commit is contained in:
Mustapha Zorgati 2022-04-06 15:39:45 +02:00
parent 541985b007
commit 6fb9dcf1c7
11 changed files with 319 additions and 347 deletions

View File

@ -104,8 +104,7 @@ describe('ClassificationDetailsComponent', () => {
let store: Store;
let actions$: Observable<any>;
beforeEach(
waitForAsync(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
NgxsModule.forRoot([ClassificationState, EngineConfigurationState]),
@ -145,8 +144,7 @@ describe('ClassificationDetailsComponent', () => {
engineConfiguration: engineConfigurationMock
});
fixture.detectChanges();
})
);
}));
it('should create component', () => {
expect(component).toBeTruthy();

View File

@ -43,8 +43,7 @@ xdescribe('ImportExportComponent', () => {
})
);
beforeEach(
waitForAsync(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [],
declarations: [ImportExportComponent],
@ -68,8 +67,7 @@ xdescribe('ImportExportComponent', () => {
app = fixture.debugElement.componentInstance;
app.currentSelection = TaskanaType.WORKBASKETS;
fixture.detectChanges();
})
);
}));
it('should create component', () => {
expect(app).toBeTruthy();

View File

@ -73,8 +73,7 @@ describe('WorkbasketDistributionTargetsListComponent', () => {
setRequestInProgress: jest.fn().mockReturnValue(of(null))
};
beforeEach(
waitForAsync(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
MatIconModule,
@ -111,8 +110,7 @@ describe('WorkbasketDistributionTargetsListComponent', () => {
engineConfiguration: engineConfigurationMock,
workbasket: workbasketReadStateMock
});
})
);
}));
it('should create component', () => {
expect(component).toBeTruthy();

View File

@ -58,8 +58,7 @@ describe('WorkbasketDistributionTargetsComponent', () => {
let store: Store;
let actions$: Observable<any>;
beforeEach(
waitForAsync(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
MatIconModule,
@ -89,8 +88,7 @@ describe('WorkbasketDistributionTargetsComponent', () => {
workbasket: workbasketReadStateMock
});
fixture.detectChanges();
})
);
}));
it('should create component', () => {
expect(component).toBeTruthy();

View File

@ -86,8 +86,7 @@ describe('WorkbasketInformationComponent', () => {
let store: Store;
let actions$: Observable<any>;
beforeEach(
waitForAsync(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
FormsModule,
@ -141,8 +140,7 @@ describe('WorkbasketInformationComponent', () => {
component.workbasket = selectedWorkbasketMock;
fixture.detectChanges();
})
);
}));
it('should create component', () => {
expect(component).toBeTruthy();
@ -174,9 +172,7 @@ describe('WorkbasketInformationComponent', () => {
expect(component.workbasket).toMatchObject(component.workbasketClone);
});
it(
'should save workbasket when workbasketId there',
waitForAsync(() => {
it('should save workbasket when workbasketId there', waitForAsync(() => {
component.workbasket = { ...selectedWorkbasketMock };
component.workbasket.workbasketId = '1';
component.action = ACTION.COPY;
@ -185,18 +181,14 @@ describe('WorkbasketInformationComponent', () => {
component.onSave();
expect(actionDispatched).toBe(true);
expect(component.workbasketClone).toMatchObject(component.workbasket);
})
);
}));
it(
'should dispatch MarkWorkbasketforDeletion action when onRemoveConfirmed is called',
waitForAsync(() => {
it('should dispatch MarkWorkbasketforDeletion action when onRemoveConfirmed is called', waitForAsync(() => {
let actionDispatched = false;
actions$.pipe(ofActionDispatched(MarkWorkbasketForDeletion)).subscribe(() => (actionDispatched = true));
component.onRemoveConfirmed();
expect(actionDispatched).toBe(true);
})
);
}));
it('should create new workbasket when workbasketId is undefined', () => {
component.workbasket.workbasketId = undefined;

View File

@ -13,8 +13,7 @@ describe('CanvasComponent', () => {
let debugElement: DebugElement;
let component: CanvasComponent;
beforeEach(
waitForAsync(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [NgxsModule.forRoot([SettingsState]), HttpClientTestingModule, MatDialogModule],
declarations: [CanvasComponent]
@ -30,8 +29,7 @@ describe('CanvasComponent', () => {
settings: settingsStateMock
});
fixture.detectChanges();
})
);
}));
it('should create the component', () => {
expect(component).toBeTruthy();

View File

@ -15,8 +15,7 @@ describe('TaskPriorityReportFilterComponent', () => {
let debugElement: DebugElement;
let component: TaskPriorityReportFilterComponent;
beforeEach(
waitForAsync(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
NgxsModule.forRoot([SettingsState]),
@ -38,8 +37,7 @@ describe('TaskPriorityReportFilterComponent', () => {
settings: settingsStateMock
});
fixture.detectChanges();
})
);
}));
it('should create the component', () => {
expect(component).toBeTruthy();

View File

@ -43,8 +43,7 @@ describe('TaskPriorityReportComponent', () => {
let debugElement: DebugElement;
let component: TaskPriorityReportComponent;
beforeEach(
waitForAsync(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [NgxsModule.forRoot([SettingsState]), MatTableModule, HttpClientTestingModule, MatDividerModule],
declarations: [TaskPriorityReportComponent, GermanTimeFormatPipe, CanvasStub, TaskPriorityReportFilterStub],
@ -64,8 +63,7 @@ describe('TaskPriorityReportComponent', () => {
settings: settingsStateMock
});
fixture.detectChanges();
})
);
}));
it('should create the component', () => {
expect(component).toBeTruthy();

View File

@ -29,8 +29,7 @@ describe('SettingsComponent', () => {
let store: Store;
let actions$: Observable<any>;
beforeEach(
waitForAsync(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
NgxsModule.forRoot([SettingsState]),
@ -62,8 +61,7 @@ describe('SettingsComponent', () => {
settings: settingsStateMock
});
fixture.detectChanges();
})
);
}));
it('should create component', () => {
expect(component).toBeTruthy();

View File

@ -28,8 +28,7 @@ describe('NavBarComponent', () => {
let debugElement: DebugElement;
let route = '';
beforeEach(
waitForAsync(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [NavBarComponent, SvgIconStub],
imports: [MatIconModule, HttpClientTestingModule, MatToolbarModule],
@ -38,8 +37,7 @@ describe('NavBarComponent', () => {
{ provide: SelectedRouteService, useValue: SelectedRouteServiceSpy }
]
}).compileComponents();
})
);
}));
beforeEach(() => {
fixture = TestBed.createComponent(NavBarComponent);

View File

@ -20,8 +20,7 @@ describe('TypeAheadComponent with AccessId input', () => {
let debugElement: DebugElement;
let component: TypeAheadComponent;
beforeEach(
waitForAsync(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
NgxsModule.forRoot([]),
@ -41,8 +40,7 @@ describe('TypeAheadComponent with AccessId input', () => {
debugElement = fixture.debugElement;
component = fixture.componentInstance;
fixture.detectChanges();
})
);
}));
it('should create component', () => {
expect(component).toBeTruthy();