code cleanup (#3210)

* code cleanup

* rollback changes

* remove dead code

* remove debug app config

* cleanup unused locales

* no-unused-vars rule

* test fixes and cleanup

* remove unnecessary translate modules
This commit is contained in:
Denys Vuika
2023-05-22 08:23:35 +01:00
committed by GitHub
parent 19e31adbb9
commit fd495f6e95
87 changed files with 197 additions and 841 deletions

View File

@@ -26,7 +26,6 @@ import { ButtonMenuComponent } from './button-menu.component';
import { TestBed, ComponentFixture } from '@angular/core/testing';
import { AppTestingModule } from '../../../testing/app-testing.module';
import { Router } from '@angular/router';
import { TranslateModule, TranslateLoader, TranslateFakeLoader } from '@ngx-translate/core';
import { AppSidenavModule } from '../sidenav.module';
describe('ButtonMenuComponent', () => {
@@ -36,13 +35,7 @@ describe('ButtonMenuComponent', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
AppTestingModule,
AppSidenavModule,
TranslateModule.forRoot({
loader: { provide: TranslateLoader, useClass: TranslateFakeLoader }
})
]
imports: [AppTestingModule, AppSidenavModule]
});
fixture = TestBed.createComponent(ButtonMenuComponent);

View File

@@ -26,7 +26,6 @@ import { ExpandMenuComponent } from './expand-menu.component';
import { TestBed, ComponentFixture } from '@angular/core/testing';
import { AppTestingModule } from '../../../testing/app-testing.module';
import { Router } from '@angular/router';
import { TranslateModule, TranslateLoader, TranslateFakeLoader } from '@ngx-translate/core';
import { AppSidenavModule } from '../sidenav.module';
describe('ExpandMenuComponent', () => {
@@ -36,13 +35,7 @@ describe('ExpandMenuComponent', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
AppTestingModule,
AppSidenavModule,
TranslateModule.forRoot({
loader: { provide: TranslateLoader, useClass: TranslateFakeLoader }
})
]
imports: [AppTestingModule, AppSidenavModule]
});
fixture = TestBed.createComponent(ExpandMenuComponent);

View File

@@ -1,38 +0,0 @@
/*!
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Alfresco Example Content Application
*
* This file is part of the Alfresco Example Content Application.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
*/
import { Component, Input } from '@angular/core';
/**
* This wrapper is designated to be used with 'adf-dynamic-component'.
* It forwards the dynamic component inputs to original sidenav.
*/
@Component({
selector: 'aca-sidenav-wrapper',
templateUrl: './sidenav-wrapper.component.html'
})
export class SidenavWrapperComponent {
@Input()
data: { mode?: 'collapsed' | 'expanded' } = {};
}

View File

@@ -28,6 +28,7 @@ import { PeopleContentService } from '@alfresco/adf-content-services';
import { AppTestingModule } from '../../../testing/app-testing.module';
import { UserMenuComponent } from './user-menu.component';
import { of } from 'rxjs';
import { SharedToolbarModule } from '@alfresco/aca-shared';
describe('UserMenuComponent', () => {
let component: UserMenuComponent;
@@ -106,7 +107,7 @@ describe('UserMenuComponent', () => {
};
TestBed.configureTestingModule({
imports: [AppTestingModule],
imports: [AppTestingModule, SharedToolbarModule],
declarations: [UserMenuComponent],
providers: [
{ provide: AuthenticationService, useValue: authServiceStub },