mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-7819] Change column order - enable drag and drop for datatable - [1/3] (#7567)
* [AAE-7819] Enable drag and drop for datatable [1/3] * [AAE-7819] Change column order - load and save columns order preferences for PROCESSES - [2/3] (#7568) * [AAE-7819] Load and save column order preferences for processes * [AAE-7819] Load and save column order preferences for tasks [3/3] (#7569) * fix css * fix icon module import * Fix unit tests * Fix test * Fix e2e * Fix C279927
This commit is contained in:
@@ -59,6 +59,8 @@ import { DocumentListModule } from '../document-list.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { ShareDataRow } from '../data/share-data-row.model';
|
||||
import { DocumentLoaderNode } from '../models/document-folder.model';
|
||||
import { matIconRegistryMock } from '../../testing/mat-icon-registry-mock';
|
||||
import { domSanitizerMock } from '../../testing/dom-sanitizer-mock';
|
||||
|
||||
describe('DocumentList', () => {
|
||||
|
||||
@@ -1139,7 +1141,7 @@ describe('DocumentList', () => {
|
||||
|
||||
it('should display [empty folder] template ', () => {
|
||||
fixture.detectChanges();
|
||||
documentList.dataTable = new DataTableComponent(null, null);
|
||||
documentList.dataTable = new DataTableComponent(null, null, matIconRegistryMock, domSanitizerMock);
|
||||
expect(documentList.dataTable).toBeDefined();
|
||||
expect(fixture.debugElement.query(By.css('adf-empty-list'))).not.toBeNull();
|
||||
});
|
||||
@@ -1157,7 +1159,7 @@ describe('DocumentList', () => {
|
||||
});
|
||||
|
||||
it('should empty folder NOT show the pagination', () => {
|
||||
documentList.dataTable = new DataTableComponent(null, null);
|
||||
documentList.dataTable = new DataTableComponent(null, null, matIconRegistryMock, domSanitizerMock);
|
||||
|
||||
expect(documentList.isEmpty()).toBeTruthy();
|
||||
expect(element.querySelector('alfresco-pagination')).toBe(null);
|
||||
|
@@ -0,0 +1,5 @@
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
|
||||
export const domSanitizerMock = {
|
||||
bypassSecurityTrustResourceUrl: () => {}
|
||||
} as any as DomSanitizer;
|
@@ -0,0 +1,5 @@
|
||||
import { MatIconRegistry } from '@angular/material/icon';
|
||||
|
||||
export const matIconRegistryMock = {
|
||||
addSvgIconInNamespace: () => {}
|
||||
} as any as MatIconRegistry;
|
Reference in New Issue
Block a user