mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-08-07 17:48:27 +00:00
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:
@@ -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', () => {
|
||||
|
@@ -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;
|
||||
},
|
||||
|
@@ -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]
|
||||
})
|
||||
|
Reference in New Issue
Block a user