[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();
});
describe('actionExecution', () => {
beforeEach(() => {
component.actionExecution().subscribe();
fixture.detectChanges();
});
});
it('should call claimedTaskService\'s submitTask', () => {
expect(claimedTaskService.submitTask).toHaveBeenCalledWith(object.id, expectedBody)
});
describe('actionExecution', () => {
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', () => {

View File

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