fix const

This commit is contained in:
Eugenio Romano
2019-03-27 11:53:53 +00:00
parent 070bf020a7
commit b55203cec7
2 changed files with 10 additions and 10 deletions

View File

@@ -444,7 +444,7 @@ describe('DocumentList', () => {
}); });
it('should disable the action if a readonly lock is applied to the file', () => { it('should disable the action if a readonly lock is applied to the file', () => {
let documentMenu = new ContentActionModel({ const documentMenu = new ContentActionModel({
permission: 'delete', permission: 'delete',
target: 'document', target: 'document',
title: 'FileAction' title: 'FileAction'
@@ -454,7 +454,7 @@ describe('DocumentList', () => {
documentMenu documentMenu
]; ];
let nodeFile = { const nodeFile = {
entry: { entry: {
isFile: true, isFile: true,
name: 'xyz', name: 'xyz',
@@ -464,14 +464,14 @@ describe('DocumentList', () => {
} }
}; };
let actions = documentList.getNodeActions(nodeFile); const actions = documentList.getNodeActions(nodeFile);
expect(actions.length).toBe(1); expect(actions.length).toBe(1);
expect(actions[0].title).toEqual('FileAction'); expect(actions[0].title).toEqual('FileAction');
expect(actions[0].disabled).toBeTruthy(); expect(actions[0].disabled).toBeTruthy();
}); });
it('should not disable the action for the lock owner if write lock is applied', () => { it('should not disable the action for the lock owner if write lock is applied', () => {
let documentMenu = new ContentActionModel({ const documentMenu = new ContentActionModel({
permission: 'delete', permission: 'delete',
target: 'document', target: 'document',
title: 'FileAction' title: 'FileAction'
@@ -483,7 +483,7 @@ describe('DocumentList', () => {
documentMenu documentMenu
]; ];
let nodeFile = { const nodeFile = {
entry: { entry: {
isFile: true, isFile: true,
name: 'xyz', name: 'xyz',
@@ -497,14 +497,14 @@ describe('DocumentList', () => {
} }
}; };
let actions = documentList.getNodeActions(nodeFile); const actions = documentList.getNodeActions(nodeFile);
expect(actions.length).toBe(1); expect(actions.length).toBe(1);
expect(actions[0].title).toEqual('FileAction'); expect(actions[0].title).toEqual('FileAction');
expect(actions[0].disabled).toBeFalsy(); expect(actions[0].disabled).toBeFalsy();
}); });
it('should disable the action if write lock is applied and user is not the lock owner', () => { it('should disable the action if write lock is applied and user is not the lock owner', () => {
let documentMenu = new ContentActionModel({ const documentMenu = new ContentActionModel({
permission: 'delete', permission: 'delete',
target: 'document', target: 'document',
title: 'FileAction' title: 'FileAction'
@@ -516,7 +516,7 @@ describe('DocumentList', () => {
documentMenu documentMenu
]; ];
let nodeFile = { const nodeFile = {
entry: { entry: {
isFile: true, isFile: true,
name: 'xyz', name: 'xyz',
@@ -530,7 +530,7 @@ describe('DocumentList', () => {
} }
}; };
let actions = documentList.getNodeActions(nodeFile); const actions = documentList.getNodeActions(nodeFile);
expect(actions.length).toBe(1); expect(actions.length).toBe(1);
expect(actions[0].title).toEqual('FileAction'); expect(actions[0].title).toEqual('FileAction');
expect(actions[0].disabled).toBeTruthy(); expect(actions[0].disabled).toBeTruthy();

View File

@@ -66,7 +66,7 @@ export class LockService {
} }
private isLockExpired(node: Node): boolean { private isLockExpired(node: Node): boolean {
let expiryLockTime = this.getLockExpiryTime(node); const expiryLockTime = this.getLockExpiryTime(node);
return moment().isAfter(expiryLockTime); return moment().isAfter(expiryLockTime);
} }
} }