mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 15:33:04 +00:00
[CSTPER-3620] Workflow Actions refresh entire MyDSpace page instead of just WorkflowItem
Fixed test. Removed unused imports.
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import { HttpHeaders } from '@angular/common/http';
|
import { HttpHeaders } from '@angular/common/http';
|
||||||
|
|
||||||
import { merge as observableMerge, Observable, of as observableOf } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { distinctUntilChanged, filter, find, flatMap, map, mergeMap, switchMap, tap } from 'rxjs/operators';
|
import { distinctUntilChanged, filter, find, flatMap, map, switchMap, tap } from 'rxjs/operators';
|
||||||
|
|
||||||
import { DataService } from '../data/data.service';
|
import { DataService } from '../data/data.service';
|
||||||
import {
|
import {
|
||||||
@@ -13,12 +13,11 @@ import {
|
|||||||
} from '../data/request.models';
|
} from '../data/request.models';
|
||||||
import { hasValue, isNotEmpty } from '../../shared/empty.util';
|
import { hasValue, isNotEmpty } from '../../shared/empty.util';
|
||||||
import { ProcessTaskResponse } from './models/process-task-response';
|
import { ProcessTaskResponse } from './models/process-task-response';
|
||||||
import {getFirstCompletedRemoteData, getResponseFromEntry} from '../shared/operators';
|
import { getFirstCompletedRemoteData } from '../shared/operators';
|
||||||
import { ErrorResponse, MessageResponse, RestResponse } from '../cache/response.models';
|
|
||||||
import { CacheableObject } from '../cache/object-cache.reducer';
|
import { CacheableObject } from '../cache/object-cache.reducer';
|
||||||
import { RemoteData } from '../data/remote-data';
|
import { RemoteData } from '../data/remote-data';
|
||||||
import { FollowLinkConfig } from '../../shared/utils/follow-link-config.model';
|
import { FollowLinkConfig } from '../../shared/utils/follow-link-config.model';
|
||||||
import {HttpOptions} from '../dspace-rest/dspace-rest.service';
|
import { HttpOptions } from '../dspace-rest/dspace-rest.service';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An abstract class that provides methods to handle task requests.
|
* An abstract class that provides methods to handle task requests.
|
||||||
|
@@ -10,7 +10,7 @@ import { RequestService} from '../../../../core/data/request.service';
|
|||||||
import { Observable} from 'rxjs';
|
import { Observable} from 'rxjs';
|
||||||
import { RemoteData} from '../../../../core/data/remote-data';
|
import { RemoteData} from '../../../../core/data/remote-data';
|
||||||
import { WorkflowItem} from '../../../../core/submission/models/workflowitem.model';
|
import { WorkflowItem} from '../../../../core/submission/models/workflowitem.model';
|
||||||
import { map, switchMap } from 'rxjs/operators';
|
import { switchMap } from 'rxjs/operators';
|
||||||
import { CLAIMED_TASK } from '../../../../core/tasks/models/claimed-task-object.resource-type';
|
import { CLAIMED_TASK } from '../../../../core/tasks/models/claimed-task-object.resource-type';
|
||||||
import { getFirstSucceededRemoteDataPayload } from '../../../../core/shared/operators';
|
import { getFirstSucceededRemoteDataPayload } from '../../../../core/shared/operators';
|
||||||
import { Item } from '../../../../core/shared/item.model';
|
import { Item } from '../../../../core/shared/item.model';
|
||||||
|
@@ -49,9 +49,4 @@ export class ClaimedTaskActionsApproveComponent extends ClaimedTaskActionsAbstra
|
|||||||
return reloadedObject;
|
return reloadedObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
// mock
|
|
||||||
actionExecution(): Observable<any> {
|
|
||||||
return of({ hasSucceeded: true});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -99,9 +99,4 @@ export class ClaimedTaskActionsRejectComponent extends ClaimedTaskActionsAbstrac
|
|||||||
});
|
});
|
||||||
return reloadedObject;
|
return reloadedObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
// mock
|
|
||||||
actionExecution(): Observable<any> {
|
|
||||||
return of({ hasSucceeded: true});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -12,7 +12,6 @@ import { spyOnExported } from '../../../testing/utils.test';
|
|||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { Item } from '../../../../core/shared/item.model';
|
import { Item } from '../../../../core/shared/item.model';
|
||||||
import { By } from '@angular/platform-browser';
|
|
||||||
|
|
||||||
const testType = 'TestType';
|
const testType = 'TestType';
|
||||||
const testContext = Context.Search;
|
const testContext = Context.Search;
|
||||||
|
Reference in New Issue
Block a user