[CSTPER-3620] Workflow Actions refresh entire MyDSpace page instead of just WorkflowItem

Test fix and environment settings restored
This commit is contained in:
Alessandro Martelli
2020-12-22 17:32:56 +01:00
parent e41e7dfa07
commit b80282c243
2 changed files with 21 additions and 11 deletions

View File

@@ -143,17 +143,27 @@ describe('ClaimedTaskActionsRejectComponent', () => {
expect(component.startActionExecution).toHaveBeenCalled(); expect(component.startActionExecution).toHaveBeenCalled();
}); });
describe('actionExecution', () => { });
beforeEach(() => {
component.actionExecution().subscribe();
fixture.detectChanges();
});
it('should call claimedTaskService\'s submitTask', () => { describe('actionExecution', () => {
expect(claimedTaskService.submitTask).toHaveBeenCalledWith(object.id, expectedBody)
}); let expectedBody;
beforeEach(() => {
spyOn((component.rejectForm as any), 'get').and.returnValue({value: 'required'});
expectedBody = {
[component.option]: 'true',
reason: 'required'
};
component.actionExecution().subscribe();
fixture.detectChanges();
}); });
it('should call claimedTaskService\'s submitTask with the proper reason', () => {
expect(claimedTaskService.submitTask).toHaveBeenCalledWith(object.id, expectedBody)
});
}); });
describe('reloadObjectExecution', () => { describe('reloadObjectExecution', () => {

View File

@@ -22,9 +22,9 @@ export const environment: GlobalConfig = {
// The REST API server settings. // The REST API server settings.
// NOTE: these must be "synced" with the 'dspace.server.url' setting in your backend's local.cfg. // NOTE: these must be "synced" with the 'dspace.server.url' setting in your backend's local.cfg.
rest: { rest: {
ssl: false, ssl: true,
host: 'localhost', host: 'dspace7.4science.cloud',
port: 8080, port: 443,
// NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript // NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript
nameSpace: '/server', nameSpace: '/server',
}, },