[ADF-2322] Card view datatable and documentlist (#2968)

* move table in style

* Enable the cardview mode

* add button in demo shell to change view
add missing translation terms toolbar

* missing comma

* add example in demo shell

* style loading and images

* border card container

* document list tests

* test check class and input

* test fix

* fix test process services

* more documentation

* rirpristinate base pacakge integgration

* remove test color
This commit is contained in:
Eugenio Romano
2018-02-21 09:57:01 +00:00
committed by GitHub
parent ff887772e3
commit 62d5dd1b30
25 changed files with 699 additions and 273 deletions

View File

@@ -155,10 +155,10 @@ describe('ProcessAttachmentListComponent', () => {
it('should display attachments when the process has attachments', async(() => {
let change = new SimpleChange(null, '123', true);
component.ngOnChanges({ 'processInstanceId': change });
fixture.detectChanges();
fixture.whenStable().then(() => {
fixture.detectChanges();
expect(fixture.debugElement.queryAll(By.css('adf-datatable tbody tr')).length).toBe(2);
expect(fixture.debugElement.queryAll(By.css('.adf-datatable-body > .adf-datatable-row')).length).toBe(2);
});
}));

View File

@@ -138,10 +138,10 @@ describe('TaskAttachmentList', () => {
it('should display attachments when the task has attachments', async(() => {
let change = new SimpleChange(null, '123', true);
component.ngOnChanges({ 'taskId': change });
fixture.detectChanges();
fixture.whenStable().then(() => {
fixture.detectChanges();
expect(fixture.debugElement.queryAll(By.css('adf-datatable tbody tr')).length).toBe(2);
expect(fixture.debugElement.queryAll(By.css('.adf-datatable-body > .adf-datatable-row')).length).toBe(2);
});
}));

View File

@@ -94,7 +94,7 @@ describe('PeopleSearchComponent', () => {
fixture.whenStable().then(() => {
fixture.detectChanges();
let gatewayElement: any = element.querySelector('#search-people-list tbody');
let gatewayElement: any = element.querySelector('#search-people-list .adf-datatable-body');
expect(gatewayElement).not.toBeNull();
expect(gatewayElement.children.length).toBe(2);
done();
@@ -136,7 +136,7 @@ describe('PeopleSearchComponent', () => {
fixture.whenStable()
.then(() => {
fixture.detectChanges();
let gatewayElement: any = element.querySelector('#search-people-list tbody');
let gatewayElement: any = element.querySelector('#search-people-list .adf-datatable-body');
expect(gatewayElement).not.toBeNull();
expect(gatewayElement.children.length).toBe(1);
done();

View File

@@ -113,7 +113,7 @@ describe('PeopleComponent', () => {
it('should show people involved', async(() => {
fixture.whenStable()
.then(() => {
let gatewayElement: any = element.querySelector('#assignment-people-list tbody');
let gatewayElement: any = element.querySelector('#assignment-people-list .adf-datatable-body');
expect(gatewayElement).not.toBeNull();
expect(gatewayElement.children.length).toBe(2);
});
@@ -127,7 +127,7 @@ describe('PeopleComponent', () => {
fixture.whenStable()
.then(() => {
fixture.detectChanges();
let gatewayElement: any = element.querySelector('#assignment-people-list tbody');
let gatewayElement: any = element.querySelector('#assignment-people-list .adf-datatable-body');
expect(gatewayElement).not.toBeNull();
expect(gatewayElement.children.length).toBe(1);
});
@@ -141,7 +141,7 @@ describe('PeopleComponent', () => {
fixture.whenStable()
.then(() => {
fixture.detectChanges();
let gatewayElement: any = element.querySelector('#assignment-people-list tbody');
let gatewayElement: any = element.querySelector('#assignment-people-list .adf-datatable-body');
expect(gatewayElement).not.toBeNull();
expect(gatewayElement.children.length).toBe(3);
});
@@ -220,7 +220,7 @@ describe('PeopleComponent', () => {
fixture.whenStable()
.then(() => {
fixture.detectChanges();
let gatewayElement: any = element.querySelector('#assignment-people-list tbody');
let gatewayElement: any = element.querySelector('#assignment-people-list .adf-datatable-body');
expect(gatewayElement).not.toBeNull();
expect(gatewayElement.children.length).toBe(2);
});
@@ -234,7 +234,7 @@ describe('PeopleComponent', () => {
fixture.whenStable()
.then(() => {
fixture.detectChanges();
let gatewayElement: any = element.querySelector('#assignment-people-list tbody');
let gatewayElement: any = element.querySelector('#assignment-people-list .adf-datatable-body');
expect(gatewayElement).not.toBeNull();
expect(gatewayElement.children.length).toBe(2);
});

View File

@@ -161,10 +161,10 @@ export class TaskListComponent implements OnChanges, OnInit, AfterContentInit, P
isStreamLoaded = false;
constructor(private taskListService: TaskListService,
private appConfig: AppConfigService,
private userPreferences: UserPreferencesService) {
private appConfig: AppConfigService,
private userPreferences: UserPreferencesService) {
this.size = this.userPreferences.paginationSize;
this.pagination = new BehaviorSubject<Pagination>(<Pagination>{
this.pagination = new BehaviorSubject<Pagination>(<Pagination> {
maxItems: this.size,
skipCount: 0,
totalItems: 0
@@ -450,4 +450,4 @@ export class TaskListComponent implements OnChanges, OnInit, AfterContentInit, P
get supportedPageSizes(): number[] {
return this.userPreferences.getDifferentPageSizes();
}
}
}