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', () => {
|
||||
expect(component.startActionExecution).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
describe('actionExecution', () => {
|
||||
beforeEach(() => {
|
||||
component.actionExecution().subscribe();
|
||||
fixture.detectChanges();
|
||||
|
||||
it('should call claimedTaskService\'s submitTask', (done) => {
|
||||
|
||||
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', () => {
|
||||
|
@@ -151,18 +151,17 @@ describe('ClaimedTaskActionsRejectComponent', () => {
|
||||
|
||||
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)
|
||||
it('should call claimedTaskService\'s submitTask with the proper reason', (done) => {
|
||||
component.actionExecution().subscribe(() => {
|
||||
expect(claimedTaskService.submitTask).toHaveBeenCalledWith(object.id, expectedBody);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user