mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-587] upgrade components to angular 4 (#1866)
[ADF-587] upgrade components to angular 4
This commit is contained in:
committed by
Eugenio Romano
parent
5ba1202292
commit
e29741d18d
@@ -44,15 +44,16 @@
|
||||
"alfresco"
|
||||
],
|
||||
"dependencies": {
|
||||
"@angular/common": "2.4.7",
|
||||
"@angular/compiler": "2.4.7",
|
||||
"@angular/core": "2.4.7",
|
||||
"@angular/forms": "2.4.7",
|
||||
"@angular/http": "2.4.7",
|
||||
"@angular/common": "~4.0.0",
|
||||
"@angular/compiler": "~4.0.0",
|
||||
"@angular/core": "~4.0.0",
|
||||
"@angular/forms": "~4.0.0",
|
||||
"@angular/http": "~4.0.0",
|
||||
"@angular/platform-browser": "~4.0.0",
|
||||
"@angular/platform-browser-dynamic": "~4.0.0",
|
||||
"@angular/router": "~4.0.0",
|
||||
|
||||
"@angular/material": "2.0.0-beta.1",
|
||||
"@angular/platform-browser": "2.4.7",
|
||||
"@angular/platform-browser-dynamic": "2.4.7",
|
||||
"@angular/router": "3.4.7",
|
||||
"alfresco-js-api": "~1.4.0",
|
||||
"core-js": "2.4.1",
|
||||
"hammerjs": "2.0.8",
|
||||
|
@@ -460,7 +460,7 @@ describe('DocumentList', () => {
|
||||
});
|
||||
|
||||
documentList.currentFolderId = 'wrong-id';
|
||||
documentList.ngOnChanges({currentFolderId: new SimpleChange(null, documentList.currentFolderId)});
|
||||
documentList.ngOnChanges({currentFolderId: new SimpleChange(null, documentList.currentFolderId, true)});
|
||||
});
|
||||
|
||||
it('should require dataTable to check empty template', () => {
|
||||
@@ -526,7 +526,7 @@ describe('DocumentList', () => {
|
||||
it('should load folder by ID on init', () => {
|
||||
documentList.currentFolderId = '1d26e465-dea3-42f3-b415-faa8364b9692';
|
||||
spyOn(documentList, 'loadFolderNodesByFolderNodeId').and.returnValue(Promise.resolve());
|
||||
documentList.ngOnChanges({folderNode: new SimpleChange(null, documentList.currentFolderId)});
|
||||
documentList.ngOnChanges({folderNode: new SimpleChange(null, documentList.currentFolderId, true)});
|
||||
expect(documentList.loadFolderNodesByFolderNodeId).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
@@ -176,7 +176,7 @@ describe('Document menu action', () => {
|
||||
describe('Check Permissions', () => {
|
||||
|
||||
it('should get the folder permission when folderId is changed', async(() => {
|
||||
let change = new SimpleChange('folder-id', 'new-folder-id');
|
||||
let change = new SimpleChange('folder-id', 'new-folder-id', true);
|
||||
component.ngOnChanges({ 'folderId': change });
|
||||
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
||||
@@ -196,7 +196,7 @@ describe('Document menu action', () => {
|
||||
}));
|
||||
|
||||
it('should disable the create button if folder does not have any allowable operations', async(() => {
|
||||
let change = new SimpleChange('folder-id', 'new-folder-id');
|
||||
let change = new SimpleChange('folder-id', 'new-folder-id', true);
|
||||
component.ngOnChanges({ 'folderId': change });
|
||||
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
||||
@@ -214,7 +214,7 @@ describe('Document menu action', () => {
|
||||
}));
|
||||
|
||||
it('should disable the create button if folder does not have create permission', async(() => {
|
||||
let change = new SimpleChange('folder-id', 'new-folder-id');
|
||||
let change = new SimpleChange('folder-id', 'new-folder-id', true);
|
||||
component.ngOnChanges({ 'folderId': change });
|
||||
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
||||
@@ -233,7 +233,7 @@ describe('Document menu action', () => {
|
||||
|
||||
it('should not disable the option when disableWithNoPermission is false', async(() => {
|
||||
component.disableWithNoPermission = false;
|
||||
let change = new SimpleChange('folder-id', 'new-folder-id');
|
||||
let change = new SimpleChange('folder-id', 'new-folder-id', true);
|
||||
component.ngOnChanges({ 'folderId': change });
|
||||
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
||||
@@ -251,7 +251,7 @@ describe('Document menu action', () => {
|
||||
}));
|
||||
|
||||
it('should emit permission event error when user does not have create permission', async(() => {
|
||||
let change = new SimpleChange('folder-id', 'new-folder-id');
|
||||
let change = new SimpleChange('folder-id', 'new-folder-id', true);
|
||||
component.ngOnChanges({ 'folderId': change });
|
||||
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
||||
|
Reference in New Issue
Block a user