[ADF-2054] Created a new widget to handle uploading file from Share (#2810)

* [ADF-2054] start creating custom upload widget for share integration

* [ADF-2054] changed content node selector service to allow different opening approach

* [ADF-2054] addedd support for multi resource files

* [ADF-2054] fixed base case for upload when only local files are selected

* [ADF-2054] start adding and fixing tests for new share attach button widget

* [ADF-2054] changed test to perfrom a correct check

* [ADF-2054] removed fdescribe

* [ADF-2054] added test for share-widget component

* [ADF-2054] added peer reviews changes

* [ADF-2054] created a module folder for content widgets

* [ADF-2054] fixed wrong import

* [ADF-2054] fixed rebase errors

* [ADF-2054] restored some files changed by rebase

* [ADF-2054] added link to content services to fix packaging issue

* [ADF-2054] renamed widget
This commit is contained in:
Vito
2018-01-12 14:28:18 +01:00
committed by Eugenio Romano
parent 69e40ea1c0
commit 46ad98cd8b
37 changed files with 886 additions and 597 deletions

View File

@@ -74,6 +74,10 @@ describe('ContentNodeSelectorComponent', () => {
_observer.next(result);
}
function returnAlwaysTrue(entry: MinimalNodeEntryEntity) {
return true;
}
function setupTestbed(plusProviders) {
TestBed.configureTestingModule({
imports: [
@@ -597,6 +601,7 @@ describe('ContentNodeSelectorComponent', () => {
beforeEach(() => {
const alfrescoContentService = TestBed.get(ContentService);
spyOn(alfrescoContentService, 'hasPermission').and.callFake(() => hasPermission);
component.isSelectionValid = returnAlwaysTrue.bind(this);
});
it('should become enabled after loading node with the necessary permissions', async(() => {
@@ -664,14 +669,14 @@ describe('ContentNodeSelectorComponent', () => {
fixture.detectChanges();
});
it('should be disabled when resetting the chosen node', () => {
it('should emit null when the chosenNode is reset', () => {
hasPermission = true;
component.onNodeSelect({ detail: { node: { entry: <MinimalNodeEntryEntity> {} } } });
fixture.detectChanges();
component.select.subscribe((nodes) => {
expect(nodes).toBeDefined();
expect(nodes).not.toBeNull();
expect(nodes).toBeNull();
});
component.resetChosenNode();