mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
prepare tests for ng-12 upgrade (#7099)
* prepare tests for ng12 upgrade * fix lint * fix tests * test fixes * fix code and tests * fix code and tests * test fixes * test fixes
This commit is contained in:
@@ -72,7 +72,7 @@ describe('NodeFavoriteDirective', () => {
|
||||
});
|
||||
|
||||
it('should reset favorites if selection is empty', fakeAsync(() => {
|
||||
spyOn(alfrescoApiService.getInstance().core.favoritesApi, 'getFavorite').and.returnValue(Promise.resolve());
|
||||
spyOn(alfrescoApiService.getInstance().core.favoritesApi, 'getFavorite').and.returnValue(Promise.resolve(null));
|
||||
|
||||
const selection = [
|
||||
{ entry: { id: '1', name: 'name1' } }
|
||||
@@ -97,7 +97,7 @@ describe('NodeFavoriteDirective', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
favoritesApiSpy = spyOn(alfrescoApiService.getInstance().core.favoritesApi, 'getFavorite')
|
||||
.and.returnValue(Promise.resolve());
|
||||
.and.returnValue(Promise.resolve(null));
|
||||
});
|
||||
|
||||
it('should check each selected node if it is a favorite', fakeAsync(() => {
|
||||
@@ -341,7 +341,7 @@ describe('NodeFavoriteDirective', () => {
|
||||
}));
|
||||
|
||||
it('should process node as favorite', fakeAsync(() => {
|
||||
spyOn(alfrescoApiService.getInstance().core.favoritesApi, 'getFavorite').and.returnValue(Promise.resolve());
|
||||
spyOn(alfrescoApiService.getInstance().core.favoritesApi, 'getFavorite').and.returnValue(Promise.resolve(null));
|
||||
|
||||
const selection = [
|
||||
{ entry: { id: '1', name: 'name1' } }
|
||||
|
Reference in New Issue
Block a user