mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
[CSTPER-3620] Workflow Actions refresh entire MyDSpace page instead of just WorkflowItem
Failing tests in CI environment refactored
This commit is contained in:
@@ -102,18 +102,22 @@ describe('ClaimedTaskActionsApproveComponent', () => {
|
|||||||
it('should start the action execution', () => {
|
it('should start the action execution', () => {
|
||||||
expect(component.startActionExecution).toHaveBeenCalled();
|
expect(component.startActionExecution).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
describe('actionExecution', () => {
|
describe('actionExecution', () => {
|
||||||
beforeEach(() => {
|
|
||||||
component.actionExecution().subscribe();
|
it('should call claimedTaskService\'s submitTask', (done) => {
|
||||||
fixture.detectChanges();
|
|
||||||
|
const expectedBody = {
|
||||||
|
[component.option]: 'true'
|
||||||
|
};
|
||||||
|
|
||||||
|
component.actionExecution().subscribe(() => {
|
||||||
|
expect(claimedTaskService.submitTask).toHaveBeenCalledWith(object.id, expectedBody);
|
||||||
|
done();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should call claimedTaskService\'s submitTask', () => {
|
|
||||||
expect(claimedTaskService.submitTask).toHaveBeenCalledWith(object.id, expectedBody)
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('reloadObjectExecution', () => {
|
describe('reloadObjectExecution', () => {
|
||||||
|
@@ -151,18 +151,17 @@ describe('ClaimedTaskActionsRejectComponent', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
spyOn((component.rejectForm as any), 'get').and.returnValue({value: 'required'});
|
spyOn((component.rejectForm as any), 'get').and.returnValue({value: 'required'});
|
||||||
|
|
||||||
expectedBody = {
|
expectedBody = {
|
||||||
[component.option]: 'true',
|
[component.option]: 'true',
|
||||||
reason: 'required'
|
reason: 'required'
|
||||||
};
|
};
|
||||||
|
|
||||||
component.actionExecution().subscribe();
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should call claimedTaskService\'s submitTask with the proper reason', () => {
|
it('should call claimedTaskService\'s submitTask with the proper reason', (done) => {
|
||||||
expect(claimedTaskService.submitTask).toHaveBeenCalledWith(object.id, expectedBody)
|
component.actionExecution().subscribe(() => {
|
||||||
|
expect(claimedTaskService.submitTask).toHaveBeenCalledWith(object.id, expectedBody);
|
||||||
|
done();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user