Skip to content

Commit

Permalink
Make test and event start functionality change
Browse files Browse the repository at this point in the history
  • Loading branch information
connorpgpmcelroy committed Sep 25, 2024
1 parent 63b589d commit 42adb14
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@ describe('CaseEditComponent', () => {
}
}));
formValueService.sanitise.and.returnValue({ name: 'sweet' });
mockSessionStorageService.getItem.and.returnValue(JSON.stringify({ uid: '1'}));
mockSessionStorageService.getItem.and.returnValue(JSON.stringify({ client_context: {user_task: {id: '1'}}}));

fixture.detectChanges();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,15 @@ export class EventStartGuard implements CanActivate {
createdTimestamp: Date.now()
};
this.sessionStorageService.setItem('taskEventCompletionInfo', JSON.stringify(taskEventCompletionInfo));
this.sessionStorageService.setItem(EventStartGuard.CLIENT_CONTEXT, JSON.stringify(task));
const storeClientContext = {
client_context: {
user_task: {
task_data: task,
complete_task: true
}
}
};
this.sessionStorageService.setItem(EventStartGuard.CLIENT_CONTEXT, JSON.stringify(storeClientContext));
} else {
this.removeTaskFromSessionStorage();
}
Expand Down

0 comments on commit 42adb14

Please sign in to comment.