mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-2438] fixed thumbnails height (#3407)
* [ADF-2438] calculate thumbnail height * [ADF-2438] send height to parent element * [ADF-2438] add width to css * [ADF-2438] moved height and width logic to parent component * [ADF-2438] added height and width logic to parent component * [ADF-2438] fixed failing test
This commit is contained in:
committed by
Eugenio Romano
parent
2f51b9f2b8
commit
1266acc4ab
@@ -32,11 +32,7 @@ describe('PdfThumbListComponent', () => {
|
||||
const page = (id) => {
|
||||
return {
|
||||
id,
|
||||
getPage: () => Promise.resolve({
|
||||
getViewport: () => {
|
||||
return 1;
|
||||
}
|
||||
})
|
||||
getPage: Promise.resolve()
|
||||
};
|
||||
};
|
||||
|
||||
@@ -51,12 +47,8 @@ describe('PdfThumbListComponent', () => {
|
||||
},
|
||||
pdfDocument: {
|
||||
getPage: (pageNum) => Promise.resolve({
|
||||
getViewport: () => {
|
||||
return 1;
|
||||
},
|
||||
render: () => {
|
||||
return Promise.resolve({});
|
||||
}
|
||||
getViewport: () => ({ height: 421, width: 335 }),
|
||||
render: jasmine.createSpy('render').and.returnValue(Promise.resolve())
|
||||
})
|
||||
},
|
||||
_pages: [
|
||||
@@ -78,7 +70,6 @@ describe('PdfThumbListComponent', () => {
|
||||
beforeEach(async(() => {
|
||||
fixture = TestBed.createComponent(PdfThumbListComponent);
|
||||
component = fixture.componentInstance;
|
||||
|
||||
component.pdfViewer = viewerMock;
|
||||
|
||||
// provide scrollable container
|
||||
@@ -100,6 +91,7 @@ describe('PdfThumbListComponent', () => {
|
||||
});
|
||||
|
||||
it('should render next range on scroll', () => {
|
||||
component.currentHeight = 114;
|
||||
fixture.nativeElement.scrollTop = 700;
|
||||
fixture.detectChanges();
|
||||
|
||||
|
Reference in New Issue
Block a user