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

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

Removing 'clearUrl' to fix redirect

parent 505606cd
2 merge requests!62created achievementService and separated some functionality out of...,!61Feature/#51 import from artemis
......@@ -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