This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit 6d369146 authored by Daniel Crazzolara's avatar Daniel Crazzolara
Browse files

Removing 'clearUrl' to fix redirect

parent 2b4e7031
2 merge requests!188Merging Peer Reviewing et. al to Master,!164211 peer reviewing functionality
......@@ -90,11 +90,7 @@ export class AccountService {
// if login is successful, go to stored previousState and clear previousState
const previousUrl = this.stateStorageService.getUrl();
if (previousUrl) {
this.router.navigateByUrl(previousUrl).then(() => {
setTimeout(() => {
this.stateStorageService.clearUrl();
}, 10000); // Remove perviousUrl after 10s, because a race condition seems to avoid the redirect
});
this.router.navigateByUrl(previousUrl);
}
}
}
......@@ -132,7 +132,6 @@ describe('Service Tests', () => {
// THEN
expect(storageService.getUrlSpy).toHaveBeenCalledTimes(1);
expect(storageService.clearUrlSpy).toHaveBeenCalledTimes(1);
expect(router.navigateByUrlSpy).toHaveBeenCalledWith('admin/users?page=0');
});
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment