mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +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:
@@ -25,13 +25,7 @@
|
||||
|
||||
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||
import { PageComponent } from './page.component';
|
||||
import {
|
||||
ReloadDocumentListAction,
|
||||
SetSelectedNodesAction,
|
||||
SetInfoDrawerStateAction,
|
||||
AppState,
|
||||
AppStore
|
||||
} from '@alfresco/aca-shared/store';
|
||||
import { ReloadDocumentListAction, SetSelectedNodesAction, SetInfoDrawerStateAction, AppState, AppStore } from '@alfresco/aca-shared/store';
|
||||
import { AppExtensionService } from '@alfresco/aca-shared';
|
||||
import { MinimalNodeEntity } from '@alfresco/js-api';
|
||||
import { ContentManagementService } from '../services/content-management.service';
|
||||
@@ -48,11 +42,7 @@ import { Component } from '@angular/core';
|
||||
class TestComponent extends PageComponent {
|
||||
node: any;
|
||||
|
||||
constructor(
|
||||
store: Store<AppStore>,
|
||||
extensions: AppExtensionService,
|
||||
content: ContentManagementService
|
||||
) {
|
||||
constructor(store: Store<AppStore>, extensions: AppExtensionService, content: ContentManagementService) {
|
||||
super(store, extensions, content);
|
||||
}
|
||||
}
|
||||
@@ -95,12 +85,12 @@ describe('PageComponent', () => {
|
||||
window.history.pushState({}, null, locationHref);
|
||||
});
|
||||
|
||||
it('should open info drawer on action event', done => {
|
||||
it('should open info drawer on action event', (done) => {
|
||||
window.history.pushState({}, null, `${locationHref}#test`);
|
||||
fixture.detectChanges();
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
component.infoDrawerOpened$.subscribe(state => {
|
||||
component.infoDrawerOpened$.subscribe((state) => {
|
||||
expect(state).toBe(true);
|
||||
done();
|
||||
});
|
||||
@@ -109,12 +99,12 @@ describe('PageComponent', () => {
|
||||
store.dispatch(new SetInfoDrawerStateAction(true));
|
||||
});
|
||||
|
||||
it('should not open info drawer if viewer outlet is active', done => {
|
||||
it('should not open info drawer if viewer outlet is active', (done) => {
|
||||
window.history.pushState({}, null, `${locationHref}#test(viewer:view)`);
|
||||
fixture.detectChanges();
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
component.infoDrawerOpened$.subscribe(state => {
|
||||
component.infoDrawerOpened$.subscribe((state) => {
|
||||
expect(state).toBe(false);
|
||||
done();
|
||||
});
|
||||
@@ -143,9 +133,7 @@ describe('PageComponent', () => {
|
||||
spyOn(store, 'dispatch');
|
||||
|
||||
component.reload();
|
||||
expect(store.dispatch).toHaveBeenCalledWith(
|
||||
new ReloadDocumentListAction()
|
||||
);
|
||||
expect(store.dispatch).toHaveBeenCalledWith(new ReloadDocumentListAction());
|
||||
});
|
||||
|
||||
it('should set selection after reload if node is passed', () => {
|
||||
@@ -157,9 +145,7 @@ describe('PageComponent', () => {
|
||||
spyOn(store, 'dispatch');
|
||||
|
||||
component.reload(node);
|
||||
expect(store.dispatch['calls'].mostRecent().args[0]).toEqual(
|
||||
new SetSelectedNodesAction([node])
|
||||
);
|
||||
expect(store.dispatch['calls'].mostRecent().args[0]).toEqual(new SetSelectedNodesAction([node]));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user