mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACS-5627] migrate to standalone components (#3339)
* standalone preview component * remove deprecated routes * remove preview routes * standalone viewer * toggle favorite * edit offline * fix tests * toggle info drawer * toggle join library * toggle favorite library * view node * convert app toolbar module to standalone directives * convert sidenav module to standalone * convert search module to standalone * shared link view * shared files * reduce module files * files component * files component cleanup * cleanup directives module * favorite libraries * favorites component * recent files component * libraries component * cleanup * remove material module barrel * open in app component * cleanup modules * migrate toolbar module to standalone * split page layout module * remove incorrect import * remove incorrect import * rule list * folder rules module * folder rules module * backwards compatibility for ADW * reduce core module usage
This commit is contained in:
@@ -22,17 +22,13 @@
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||
import { DataTableComponent } from '@alfresco/adf-core';
|
||||
import { CustomResourcesService, DocumentListComponent, NodeFavoriteDirective } from '@alfresco/adf-content-services';
|
||||
import { of } from 'rxjs';
|
||||
import { CustomResourcesService } from '@alfresco/adf-content-services';
|
||||
import { BehaviorSubject, of, Subject } from 'rxjs';
|
||||
import { FavoritesComponent } from './favorites.component';
|
||||
import { AppTestingModule } from '../../testing/app-testing.module';
|
||||
import { ContentApiService } from '@alfresco/aca-shared';
|
||||
import { MatDialogModule } from '@angular/material/dialog';
|
||||
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
||||
import { AppService, ContentApiService } from '@alfresco/aca-shared';
|
||||
|
||||
describe('FavoritesComponent', () => {
|
||||
let fixture: ComponentFixture<FavoritesComponent>;
|
||||
@@ -43,18 +39,16 @@ describe('FavoritesComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [AppTestingModule, MatDialogModule, MatSnackBarModule],
|
||||
declarations: [DataTableComponent, NodeFavoriteDirective, DocumentListComponent, FavoritesComponent],
|
||||
imports: [AppTestingModule, FavoritesComponent],
|
||||
providers: [
|
||||
{
|
||||
provide: Router,
|
||||
provide: AppService,
|
||||
useValue: {
|
||||
url: 'favorites',
|
||||
navigate: () => {}
|
||||
appNavNarMode$: new BehaviorSubject('expanded'),
|
||||
toggleAppNavBar$: new Subject()
|
||||
}
|
||||
}
|
||||
],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
]
|
||||
});
|
||||
|
||||
const page: any = {
|
||||
@@ -81,6 +75,7 @@ describe('FavoritesComponent', () => {
|
||||
|
||||
contentApi = TestBed.inject(ContentApiService);
|
||||
router = TestBed.inject(Router);
|
||||
spyOnProperty(router, 'url').and.returnValue('favorites');
|
||||
});
|
||||
|
||||
describe('Node navigation', () => {
|
||||
|
Reference in New Issue
Block a user