mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-1092] independent styles for data-table (#2084)
* independent styles for datatable - datatable (and all derived components) no longer depend on MDL css/js * readme update
This commit is contained in:
committed by
Eugenio Romano
parent
fb4ed0209b
commit
f715361f94
@@ -57,9 +57,6 @@ describe('DataTable', () => {
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
// reset MDL handler
|
||||
window['componentHandler'] = null;
|
||||
|
||||
eventMock = {
|
||||
preventDefault: function () {
|
||||
}
|
||||
@@ -191,7 +188,7 @@ describe('DataTable', () => {
|
||||
|
||||
let headers = element.querySelectorAll('th');
|
||||
expect(headers.length).toBe(4);
|
||||
expect(headers[headers.length - 1].classList.contains('alfresco-datatable__actions-header')).toBeTruthy();
|
||||
expect(headers[headers.length - 1].classList.contains('actions-column')).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should put actions menu to the left', () => {
|
||||
@@ -206,7 +203,7 @@ describe('DataTable', () => {
|
||||
|
||||
let headers = element.querySelectorAll('th');
|
||||
expect(headers.length).toBe(4);
|
||||
expect(headers[0].classList.contains('alfresco-datatable__actions-header')).toBeTruthy();
|
||||
expect(headers[0].classList.contains('actions-column')).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should initialize default adapter', () => {
|
||||
@@ -414,19 +411,6 @@ describe('DataTable', () => {
|
||||
|
||||
});
|
||||
|
||||
it('should upgrade MDL components on view checked', () => {
|
||||
let handler = jasmine.createSpyObj('componentHandler', ['upgradeAllRegistered']);
|
||||
window['componentHandler'] = handler;
|
||||
|
||||
dataTable.ngAfterContentInit();
|
||||
expect(handler.upgradeAllRegistered).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should upgrade MDL components only when component handler present', () => {
|
||||
expect(window['componentHandler']).toBeNull();
|
||||
dataTable.ngAfterContentInit();
|
||||
});
|
||||
|
||||
it('should invert "select all" status', () => {
|
||||
expect(dataTable.isSelectAllChecked).toBeFalsy();
|
||||
dataTable.onSelectAllClick(<MdCheckboxChange> { checked: true });
|
||||
|
Reference in New Issue
Block a user