Prettier upgrade and e2e type checks (#1522)

* upgrade prettier

* noImplicitAny rule

* fix type

* update tsconfig

* upgrade to 150 print width
This commit is contained in:
Denys Vuika
2020-07-14 10:03:23 +01:00
committed by GitHub
parent 32793ea7b0
commit ddc6f36ab4
339 changed files with 5170 additions and 8763 deletions

View File

@@ -26,10 +26,7 @@ import { ContentActionRef } from '@alfresco/adf-extensions';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { Store } from '@ngrx/store';
import {
SetInfoDrawerStateAction,
ToggleInfoDrawerAction
} from '@alfresco/aca-shared/store';
import { SetInfoDrawerStateAction, ToggleInfoDrawerAction } from '@alfresco/aca-shared/store';
import { of, Subject } from 'rxjs';
import { InfoDrawerComponent } from './info-drawer.component';
import { LibTestingModule } from '../../testing/lib-testing-module';
@@ -64,11 +61,7 @@ describe('InfoDrawerComponent', () => {
TestBed.configureTestingModule({
imports: [LibTestingModule, SharedToolbarModule],
declarations: [InfoDrawerComponent],
providers: [
ContentApiService,
{ provide: AppExtensionService, useValue: extensionServiceMock },
{ provide: Store, useValue: storeMock }
],
providers: [ContentApiService, { provide: AppExtensionService, useValue: extensionServiceMock }, { provide: Store, useValue: storeMock }],
schemas: [NO_ERRORS_SCHEMA]
});
@@ -95,9 +88,7 @@ describe('InfoDrawerComponent', () => {
fixture.detectChanges();
component.ngOnDestroy();
expect(storeMock.dispatch).toHaveBeenCalledWith(
new SetInfoDrawerStateAction(false)
);
expect(storeMock.dispatch).toHaveBeenCalledWith(new SetInfoDrawerStateAction(false));
});
it('should set displayNode when node is library', async(() => {
@@ -174,9 +165,7 @@ describe('InfoDrawerComponent', () => {
fixture.debugElement.nativeElement.dispatchEvent(event);
expect(storeMock.dispatch).toHaveBeenCalledWith(
new ToggleInfoDrawerAction()
);
expect(storeMock.dispatch).toHaveBeenCalledWith(new ToggleInfoDrawerAction());
});
it('should show the icons from extension', () => {

View File

@@ -23,26 +23,11 @@
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
import {
Component,
HostListener,
Input,
OnChanges,
OnDestroy,
OnInit
} from '@angular/core';
import {
MinimalNodeEntity,
MinimalNodeEntryEntity,
SiteEntry
} from '@alfresco/js-api';
import { Component, HostListener, Input, OnChanges, OnDestroy, OnInit } from '@angular/core';
import { MinimalNodeEntity, MinimalNodeEntryEntity, SiteEntry } from '@alfresco/js-api';
import { ContentActionRef, SidebarTabRef } from '@alfresco/adf-extensions';
import { Store } from '@ngrx/store';
import {
getAppSelection,
SetInfoDrawerStateAction,
ToggleInfoDrawerAction
} from '@alfresco/aca-shared/store';
import { getAppSelection, SetInfoDrawerStateAction, ToggleInfoDrawerAction } from '@alfresco/aca-shared/store';
import { AppExtensionService } from '../../services/app.extension.service';
import { ContentApiService } from '../../services/content-api.service';
import { takeUntil } from 'rxjs/operators';
@@ -69,11 +54,7 @@ export class InfoDrawerComponent implements OnChanges, OnInit, OnDestroy {
this.close();
}
constructor(
private store: Store<any>,
private contentApi: ContentApiService,
private extensions: AppExtensionService
) {}
constructor(private store: Store<any>, private contentApi: ContentApiService, private extensions: AppExtensionService) {}
ngOnInit() {
this.tabs = this.extensions.getSidebarTabs();
@@ -117,7 +98,7 @@ export class InfoDrawerComponent implements OnChanges, OnInit, OnDestroy {
this.isLoading = true;
this.contentApi.getNodeInfo(nodeId).subscribe(
entity => {
(entity) => {
this.setDisplayNode(entity);
this.isLoading = false;
},

View File

@@ -32,14 +32,7 @@ import { MatProgressBarModule } from '@angular/material/progress-bar';
import { SharedToolbarModule } from '../tool-bar/shared-toolbar.module';
@NgModule({
imports: [
CommonModule,
InfoDrawerModule,
MatProgressBarModule,
ExtensionsModule,
ToolbarModule,
SharedToolbarModule
],
imports: [CommonModule, InfoDrawerModule, MatProgressBarModule, ExtensionsModule, ToolbarModule, SharedToolbarModule],
declarations: [InfoDrawerComponent],
exports: [InfoDrawerComponent]
})