1
0

72699: Hard redirect after log in - loading fixes

This commit is contained in:
Kristof De Langhe
2020-08-27 14:50:13 +02:00
parent 7fbae8997d
commit 55c45f5f6c
25 changed files with 204 additions and 146 deletions

View File

@@ -15,6 +15,7 @@ import { AuthServiceStub } from '../../../testing/auth-service.stub';
import { AppState } from '../../../../app.reducer';
import { AuthMethod } from '../../../../core/auth/models/auth.method';
import { AuthMethodType } from '../../../../core/auth/models/auth.method-type';
import { HardRedirectService } from '../../../../core/services/hard-redirect.service';
describe('LogInPasswordComponent', () => {
@@ -29,8 +30,14 @@ describe('LogInPasswordComponent', () => {
loading: false,
};
let hardRedirectService: HardRedirectService;
beforeEach(() => {
user = EPersonMock;
hardRedirectService = jasmine.createSpyObj('hardRedirectService', {
getCurrentRoute: {}
});
});
beforeEach(async(() => {
@@ -47,7 +54,8 @@ describe('LogInPasswordComponent', () => {
],
providers: [
{ provide: AuthService, useClass: AuthServiceStub },
{ provide: 'authMethodProvider', useValue: new AuthMethod(AuthMethodType.Password) }
{ provide: 'authMethodProvider', useValue: new AuthMethod(AuthMethodType.Password) },
{ provide: HardRedirectService, useValue: hardRedirectService },
],
schemas: [
CUSTOM_ELEMENTS_SCHEMA