mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
fixed issues after merging
This commit is contained in:
@@ -35,16 +35,23 @@ describe('AuthResponseParsingService', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('parse', () => {
|
describe('parse', () => {
|
||||||
const validRequest = new AuthPostRequest(
|
let validRequest;
|
||||||
|
let validRequest2;
|
||||||
|
let validResponse;
|
||||||
|
let validResponse1;
|
||||||
|
let validResponse2;
|
||||||
|
beforeEach(() => {
|
||||||
|
|
||||||
|
validRequest = new AuthPostRequest(
|
||||||
'69f375b5-19f4-4453-8c7a-7dc5c55aafbb',
|
'69f375b5-19f4-4453-8c7a-7dc5c55aafbb',
|
||||||
'https://rest.api/dspace-spring-rest/api/authn/login',
|
'https://rest.api/dspace-spring-rest/api/authn/login',
|
||||||
'password=test&user=myself@testshib.org');
|
'password=test&user=myself@testshib.org');
|
||||||
|
|
||||||
const validRequest2 = new AuthGetRequest(
|
validRequest2 = new AuthGetRequest(
|
||||||
'69f375b5-19f4-4453-8c7a-7dc5c55aafbb',
|
'69f375b5-19f4-4453-8c7a-7dc5c55aafbb',
|
||||||
'https://rest.api/dspace-spring-rest/api/authn/status');
|
'https://rest.api/dspace-spring-rest/api/authn/status');
|
||||||
|
|
||||||
const validResponse = {
|
validResponse = {
|
||||||
payload: {
|
payload: {
|
||||||
authenticated: true,
|
authenticated: true,
|
||||||
id: null,
|
id: null,
|
||||||
@@ -58,13 +65,13 @@ describe('AuthResponseParsingService', () => {
|
|||||||
statusText: '200'
|
statusText: '200'
|
||||||
};
|
};
|
||||||
|
|
||||||
const validResponse1 = {
|
validResponse1 = {
|
||||||
payload: {},
|
payload: {},
|
||||||
statusCode: 404,
|
statusCode: 404,
|
||||||
statusText: '404'
|
statusText: '404'
|
||||||
};
|
};
|
||||||
|
|
||||||
const validResponse2 = {
|
validResponse2 = {
|
||||||
payload: {
|
payload: {
|
||||||
authenticated: true,
|
authenticated: true,
|
||||||
id: null,
|
id: null,
|
||||||
@@ -124,6 +131,7 @@ describe('AuthResponseParsingService', () => {
|
|||||||
statusText: '200'
|
statusText: '200'
|
||||||
|
|
||||||
};
|
};
|
||||||
|
});
|
||||||
|
|
||||||
it('should return a AuthStatusResponse if data contains a valid AuthStatus object as payload', () => {
|
it('should return a AuthStatusResponse if data contains a valid AuthStatus object as payload', () => {
|
||||||
const response = service.parse(validRequest, validResponse);
|
const response = service.parse(validRequest, validResponse);
|
||||||
|
@@ -107,6 +107,12 @@ import { MyDSpaceResponseParsingService } from './data/mydspace-response-parsing
|
|||||||
import { ClaimedTaskDataService } from './tasks/claimed-task-data.service';
|
import { ClaimedTaskDataService } from './tasks/claimed-task-data.service';
|
||||||
import { PoolTaskDataService } from './tasks/pool-task-data.service';
|
import { PoolTaskDataService } from './tasks/pool-task-data.service';
|
||||||
import { TaskResponseParsingService } from './tasks/task-response-parsing.service';
|
import { TaskResponseParsingService } from './tasks/task-response-parsing.service';
|
||||||
|
import { NormalizedClaimedTask } from './tasks/models/normalized-claimed-task-object.model';
|
||||||
|
import { NormalizedTaskObject } from './tasks/models/normalized-task-object.model';
|
||||||
|
import { NormalizedPoolTask } from './tasks/models/normalized-pool-task-object.model';
|
||||||
|
import { NormalizedRelationship } from './cache/models/items/normalized-relationship.model';
|
||||||
|
import { NormalizedRelationshipType } from './cache/models/items/normalized-relationship-type.model';
|
||||||
|
import { NormalizedItemType } from './cache/models/items/normalized-item-type.model';
|
||||||
|
|
||||||
const IMPORTS = [
|
const IMPORTS = [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
@@ -227,7 +233,13 @@ export const normalizedModels =
|
|||||||
NormalizedSubmissionSectionModel,
|
NormalizedSubmissionSectionModel,
|
||||||
NormalizedAuthStatus,
|
NormalizedAuthStatus,
|
||||||
NormalizedAuthorityValue,
|
NormalizedAuthorityValue,
|
||||||
BrowseEntry
|
BrowseEntry,
|
||||||
|
NormalizedClaimedTask,
|
||||||
|
NormalizedTaskObject,
|
||||||
|
NormalizedPoolTask,
|
||||||
|
NormalizedRelationship,
|
||||||
|
NormalizedRelationshipType,
|
||||||
|
NormalizedItemType
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@@ -31,6 +31,20 @@ export class NormalizedClaimedTask extends NormalizedTaskObject<ClaimedTask> {
|
|||||||
@autoserialize
|
@autoserialize
|
||||||
action: string;
|
action: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The eperson object for this task
|
||||||
|
*/
|
||||||
|
@autoserialize
|
||||||
|
@relationship(ResourceType.EPerson, false)
|
||||||
|
eperson: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The group object for this task
|
||||||
|
*/
|
||||||
|
@autoserialize
|
||||||
|
@relationship(ResourceType.Group, false)
|
||||||
|
group: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The workflowitem object whom this task is related
|
* The workflowitem object whom this task is related
|
||||||
*/
|
*/
|
||||||
|
@@ -31,6 +31,13 @@ export class NormalizedPoolTask extends NormalizedTaskObject<PoolTask> {
|
|||||||
@autoserialize
|
@autoserialize
|
||||||
action: string;
|
action: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The group object for this task
|
||||||
|
*/
|
||||||
|
@autoserialize
|
||||||
|
@relationship(ResourceType.Group, false)
|
||||||
|
group: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The workflowitem object whom this task is related
|
* The workflowitem object whom this task is related
|
||||||
*/
|
*/
|
||||||
|
@@ -30,6 +30,20 @@ export abstract class NormalizedTaskObject<T extends DSpaceObject> extends Norma
|
|||||||
@autoserialize
|
@autoserialize
|
||||||
action: string;
|
action: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The eperson object for this task
|
||||||
|
*/
|
||||||
|
@autoserialize
|
||||||
|
@relationship(ResourceType.EPerson, false)
|
||||||
|
eperson: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The group object for this task
|
||||||
|
*/
|
||||||
|
@autoserialize
|
||||||
|
@relationship(ResourceType.Group, false)
|
||||||
|
group: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The workflowitem object whom this task is related
|
* The workflowitem object whom this task is related
|
||||||
*/
|
*/
|
||||||
|
@@ -5,6 +5,8 @@ import { DSpaceObject } from '../../shared/dspace-object.model';
|
|||||||
import { ListableObject } from '../../../shared/object-collection/shared/listable-object.model';
|
import { ListableObject } from '../../../shared/object-collection/shared/listable-object.model';
|
||||||
import { RemoteData } from '../../data/remote-data';
|
import { RemoteData } from '../../data/remote-data';
|
||||||
import { WorkflowItem } from '../../submission/models/workflowitem.model';
|
import { WorkflowItem } from '../../submission/models/workflowitem.model';
|
||||||
|
import { Group } from '../../eperson/models/group.model';
|
||||||
|
import { EPerson } from '../../eperson/models/eperson.model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An abstract model class for a TaskObject.
|
* An abstract model class for a TaskObject.
|
||||||
@@ -26,6 +28,16 @@ export class TaskObject extends DSpaceObject implements CacheableObject, Listabl
|
|||||||
*/
|
*/
|
||||||
action: string;
|
action: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The group of this task
|
||||||
|
*/
|
||||||
|
eperson: Observable<RemoteData<EPerson>>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The group of this task
|
||||||
|
*/
|
||||||
|
group: Observable<RemoteData<Group>>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The workflowitem object whom this task is related
|
* The workflowitem object whom this task is related
|
||||||
*/
|
*/
|
||||||
|
@@ -10,6 +10,7 @@ import { ClaimedTaskMyDSpaceResult } from '../../../object-collection/shared/cla
|
|||||||
import { ClaimedTask } from '../../../../core/tasks/models/claimed-task-object.model';
|
import { ClaimedTask } from '../../../../core/tasks/models/claimed-task-object.model';
|
||||||
import { RemoteData } from '../../../../core/data/remote-data';
|
import { RemoteData } from '../../../../core/data/remote-data';
|
||||||
import { MyDspaceItemStatusType } from '../../../object-collection/shared/mydspace-item-status/my-dspace-item-status-type';
|
import { MyDspaceItemStatusType } from '../../../object-collection/shared/mydspace-item-status/my-dspace-item-status-type';
|
||||||
|
import { WorkflowItem } from '../../../../core/submission/models/workflowitem.model';
|
||||||
|
|
||||||
let component: ClaimedMyDSpaceResultListElementComponent;
|
let component: ClaimedMyDSpaceResultListElementComponent;
|
||||||
let fixture: ComponentFixture<ClaimedMyDSpaceResultListElementComponent>;
|
let fixture: ComponentFixture<ClaimedMyDSpaceResultListElementComponent>;
|
||||||
|
Reference in New Issue
Block a user