mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
Fix unit tests (for js-api 0.3.3)
This commit is contained in:
parent
433d192b70
commit
75fca80c1f
@ -130,7 +130,7 @@ describe('ShareDataTableAdapter', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should covert cell value to formatted date', () => {
|
it('should covert cell value to formatted date', () => {
|
||||||
let rawValue = new Date(2015, 6, 15, 21, 43, 11).toString(); // Wed Jul 15 2015 21:43:11 GMT+0100 (BST);
|
let rawValue = new Date(2015, 6, 15, 21, 43, 11); // Wed Jul 15 2015 21:43:11 GMT+0100 (BST);
|
||||||
let dateValue = 'Jul 15, 2015, 9:43:11 PM';
|
let dateValue = 'Jul 15, 2015, 9:43:11 PM';
|
||||||
|
|
||||||
let file = new FileNode();
|
let file = new FileNode();
|
||||||
@ -150,7 +150,7 @@ describe('ShareDataTableAdapter', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should use default date format as fallback', () => {
|
it('should use default date format as fallback', () => {
|
||||||
let rawValue = new Date(2015, 6, 15, 21, 43, 11).toString(); // Wed Jul 15 2015 21:43:11 GMT+0100 (BST);
|
let rawValue = new Date(2015, 6, 15, 21, 43, 11); // Wed Jul 15 2015 21:43:11 GMT+0100 (BST);
|
||||||
let dateValue = 'Jul 15, 2015, 9:43:11 PM';
|
let dateValue = 'Jul 15, 2015, 9:43:11 PM';
|
||||||
|
|
||||||
let file = new FileNode();
|
let file = new FileNode();
|
||||||
@ -170,7 +170,7 @@ describe('ShareDataTableAdapter', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should return date value as string', () => {
|
it('should return date value as string', () => {
|
||||||
let rawValue = new Date(2015, 6, 15, 21, 43, 11).toString(); // Wed Jul 15 2015 21:43:11 GMT+0100 (BST);
|
let rawValue = new Date(2015, 6, 15, 21, 43, 11); // Wed Jul 15 2015 21:43:11 GMT+0100 (BST);
|
||||||
|
|
||||||
let file = new FileNode();
|
let file = new FileNode();
|
||||||
file.entry.createdAt = rawValue;
|
file.entry.createdAt = rawValue;
|
||||||
@ -188,7 +188,7 @@ describe('ShareDataTableAdapter', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should log error when having date conversion issues', () => {
|
it('should log error when having date conversion issues', () => {
|
||||||
let dateValue = '[wrong-date]';
|
let dateValue = null;
|
||||||
let file = new FileNode();
|
let file = new FileNode();
|
||||||
file.entry.createdAt = dateValue;
|
file.entry.createdAt = dateValue;
|
||||||
|
|
||||||
|
@ -47,9 +47,9 @@ export class MinimalNodeEntryEntity {
|
|||||||
nodeType: string;
|
nodeType: string;
|
||||||
isFolder: boolean;
|
isFolder: boolean;
|
||||||
isFile: boolean;
|
isFile: boolean;
|
||||||
modifiedAt: string;
|
modifiedAt: Date;
|
||||||
modifiedByUser: UserInfo;
|
modifiedByUser: UserInfo;
|
||||||
createdAt: string;
|
createdAt: Date;
|
||||||
createdByUser: UserInfo;
|
createdByUser: UserInfo;
|
||||||
content: ContentInfo;
|
content: ContentInfo;
|
||||||
path: PathInfoEntity;
|
path: PathInfoEntity;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user