mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACS-8398] unit tests part 3 (#4163)
* ACS-8398 Unit tests for search ai effects * ACS-8398 Unit tests for canDisplayKnowledgeRetrievalButton rule * ACS-8398 Unit tests for changes in document base page * ACS-8398 Added unit tests for changes in recent files component * ACS-8398 Unit tests for changes in lists pages * ACS-8398 Moved variable to inside of describe * ACS-8398 Moved repeated code to function * ACS-8398 Reverted one change * ACS-8398 Fix after rebase * ACS-8398 Fix issue with repeated code * ACS-8398 Fix issue with repeated code * ACS-8398 Fixed unit tests * ACS-8398 Fixed unit tests * ACS-8398 Trigger job
This commit is contained in:
@@ -31,6 +31,7 @@ import { AppTestingModule } from '../../testing/app-testing.module';
|
||||
import { AppService, ContentApiService } from '@alfresco/aca-shared';
|
||||
import { getTitleElementText } from '../../testing/test-utils';
|
||||
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
||||
import { testHeader } from '../../testing/document-base-page-utils';
|
||||
|
||||
describe('FavoritesComponent', () => {
|
||||
let fixture: ComponentFixture<FavoritesComponent>;
|
||||
@@ -140,4 +141,6 @@ describe('FavoritesComponent', () => {
|
||||
fixture.detectChanges();
|
||||
expect(getTitleElementText(fixture)).toBe('APP.HEADER.SELECTED');
|
||||
});
|
||||
|
||||
testHeader(FavoritesComponent);
|
||||
});
|
||||
|
@@ -35,6 +35,7 @@ import { By } from '@angular/platform-browser';
|
||||
import { NodeEntry, NodePaging, Node, PathElement } from '@alfresco/js-api';
|
||||
import { DocumentListPresetRef } from '@alfresco/adf-extensions';
|
||||
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
||||
import { testHeader } from '../../testing/document-base-page-utils';
|
||||
|
||||
describe('FilesComponent', () => {
|
||||
let node;
|
||||
@@ -473,4 +474,6 @@ describe('FilesComponent', () => {
|
||||
expect(resetNewFolderPaginationSpy).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
testHeader(FilesComponent);
|
||||
});
|
||||
|
@@ -31,6 +31,7 @@ import { NodePaging, SearchApi } from '@alfresco/js-api';
|
||||
import { of } from 'rxjs';
|
||||
import { getTitleElementText } from '../../testing/test-utils';
|
||||
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
||||
import { testHeader } from '../../testing/document-base-page-utils';
|
||||
|
||||
describe('RecentFilesComponent', () => {
|
||||
let fixture: ComponentFixture<RecentFilesComponent>;
|
||||
@@ -110,4 +111,6 @@ describe('RecentFilesComponent', () => {
|
||||
fixture.detectChanges();
|
||||
expect(getTitleElementText(fixture)).toBe('APP.HEADER.SELECTED');
|
||||
});
|
||||
|
||||
testHeader(RecentFilesComponent);
|
||||
});
|
||||
|
@@ -34,6 +34,7 @@ import { BehaviorSubject, Subject } from 'rxjs';
|
||||
import { AppTestingModule } from '../../../testing/app-testing.module';
|
||||
import { AppService } from '@alfresco/aca-shared';
|
||||
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
||||
import { testHeader } from '../../../testing/document-base-page-utils';
|
||||
|
||||
describe('SearchComponent', () => {
|
||||
let component: SearchResultsComponent;
|
||||
@@ -279,4 +280,6 @@ describe('SearchComponent', () => {
|
||||
expect(queryBuilder.userQuery).toBe(`((=cm:tag:"orange"))`);
|
||||
expect(queryBuilder.update).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
testHeader(SearchResultsComponent, false);
|
||||
});
|
||||
|
@@ -31,8 +31,9 @@ import { By } from '@angular/platform-browser';
|
||||
import { SharedLinkPaging } from '@alfresco/js-api';
|
||||
import { AppService } from '@alfresco/aca-shared';
|
||||
import { getTitleElementText } from '../../testing/test-utils';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { ActivatedRoute, NavigationStart, Router } from '@angular/router';
|
||||
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
||||
import { testHeader } from '../../testing/document-base-page-utils';
|
||||
|
||||
describe('SharedFilesComponent', () => {
|
||||
let fixture: ComponentFixture<SharedFilesComponent>;
|
||||
@@ -40,7 +41,8 @@ describe('SharedFilesComponent', () => {
|
||||
let component: SharedFilesComponent;
|
||||
const routerMock = {
|
||||
routerState: { root: '' },
|
||||
url: 'shared-files'
|
||||
url: 'shared-files',
|
||||
events: new Subject<NavigationStart>()
|
||||
};
|
||||
const route = {
|
||||
snapshot: {
|
||||
@@ -104,4 +106,6 @@ describe('SharedFilesComponent', () => {
|
||||
const pagination = fixture.debugElement.query(By.css('.adf-pagination'));
|
||||
expect(pagination).toBeNull();
|
||||
});
|
||||
|
||||
testHeader(SharedFilesComponent);
|
||||
});
|
||||
|
Reference in New Issue
Block a user