mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Clean unit test in login component and site (#4908)
* sanatize login style * remove unusefull test in site api
This commit is contained in:
@@ -35,6 +35,7 @@ import {
|
||||
AppConfigValues
|
||||
} from '../../app-config/app-config.service';
|
||||
import { OauthConfigModel } from '../../models/oauth-config.model';
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
|
||||
enum LoginSteps {
|
||||
Landing = 0,
|
||||
@@ -142,7 +143,8 @@ export class LoginComponent implements OnInit {
|
||||
private appConfig: AppConfigService,
|
||||
private userPreferences: UserPreferencesService,
|
||||
private location: Location,
|
||||
private route: ActivatedRoute
|
||||
private route: ActivatedRoute,
|
||||
private sanitizer: DomSanitizer
|
||||
) {
|
||||
this.initFormError();
|
||||
this.initFormFieldsMessages();
|
||||
@@ -349,6 +351,10 @@ export class LoginComponent implements OnInit {
|
||||
event.target.value = event.target.value.trim();
|
||||
}
|
||||
|
||||
getBackgroundUrlImageUrl() {
|
||||
return this.sanitizer.bypassSecurityTrustStyle(`url(${this.backgroundImageUrl})`);
|
||||
}
|
||||
|
||||
/**
|
||||
* Default formError values
|
||||
*/
|
||||
|
Reference in New Issue
Block a user