mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[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:
@@ -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();
|
||||
|
Reference in New Issue
Block a user