mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
fix eslint warnigs for core project (#7506)
This commit is contained in:
@@ -26,7 +26,6 @@ import { LoginErrorEvent } from '../models/login-error.event';
|
||||
import { LoginSuccessEvent } from '../models/login-success.event';
|
||||
import { LoginComponent } from './login.component';
|
||||
import { of, throwError } from 'rxjs';
|
||||
import { OauthConfigModel } from '../../models/oauth-config.model';
|
||||
import { AlfrescoApiService } from '../../services/alfresco-api.service';
|
||||
|
||||
import { setupTestBed } from '../../testing/setup-test-bed';
|
||||
@@ -46,9 +45,7 @@ describe('LoginComponent', () => {
|
||||
let usernameInput;
|
||||
let passwordInput;
|
||||
|
||||
const getLoginErrorElement = () => {
|
||||
return element.querySelector('#login-error');
|
||||
};
|
||||
const getLoginErrorElement = () => element.querySelector('#login-error');
|
||||
|
||||
const getLoginErrorMessage = () => {
|
||||
const errorMessage = undefined;
|
||||
@@ -94,7 +91,7 @@ describe('LoginComponent', () => {
|
||||
fixture.destroy();
|
||||
});
|
||||
|
||||
function loginWithCredentials(username: string, password: string) {
|
||||
const loginWithCredentials = (username: string, password: string) => {
|
||||
usernameInput.value = username;
|
||||
passwordInput.value = password;
|
||||
|
||||
@@ -104,7 +101,7 @@ describe('LoginComponent', () => {
|
||||
|
||||
element.querySelector('.adf-login-button').click();
|
||||
fixture.detectChanges();
|
||||
}
|
||||
};
|
||||
|
||||
it('should be autocomplete off', () => {
|
||||
expect(
|
||||
@@ -616,7 +613,7 @@ describe('LoginComponent', () => {
|
||||
describe('implicitFlow ', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
appConfigService.config.oauth2 = <OauthConfigModel> { implicitFlow: true, silentLogin: false };
|
||||
appConfigService.config.oauth2 = { implicitFlow: true, silentLogin: false };
|
||||
appConfigService.load();
|
||||
alfrescoApiService.reset();
|
||||
});
|
||||
@@ -634,7 +631,7 @@ describe('LoginComponent', () => {
|
||||
|
||||
it('should not render the implicitFlow button in case silentLogin is enabled', fakeAsync(() => {
|
||||
spyOn(authService, 'isOauth').and.returnValue(true);
|
||||
appConfigService.config.oauth2 = <OauthConfigModel> { implicitFlow: true, silentLogin: true };
|
||||
appConfigService.config.oauth2 = { implicitFlow: true, silentLogin: true };
|
||||
|
||||
spyOn(component, 'redirectToImplicitLogin').and.stub();
|
||||
|
||||
|
Reference in New Issue
Block a user