mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Remove discovery (#5212)
* remove discovery * remoce discovery test * fix save remote * use host acs to save screenshot * fix e2e * remove invalid test * fix the package version
This commit is contained in:
committed by
Denys Vuika
parent
040fc52724
commit
7d36400dbd
@@ -660,35 +660,6 @@ describe('LoginComponent', () => {
|
||||
expect(element.querySelector('#login-button-sso')).toBeDefined();
|
||||
});
|
||||
}));
|
||||
|
||||
it('should show the SSO error when the discovery server is unreachable', async(() => {
|
||||
spyOn(authService, 'isOauth').and.returnValue(true);
|
||||
spyOn(authService, 'isSSODiscoveryConfigured').and.returnValue(false);
|
||||
|
||||
component.ngOnInit();
|
||||
fixture.detectChanges();
|
||||
element.querySelector('[data-automation-id="login-button-sso"]').click();
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
expect(getLoginErrorMessage()).toEqual('LOGIN.MESSAGES.SSO-WRONG-CONFIGURATION');
|
||||
});
|
||||
}));
|
||||
|
||||
it('should not show the SSO error when the discovery server is reachable', async(() => {
|
||||
spyOn(authService, 'isOauth').and.returnValue(true);
|
||||
spyOn(authService, 'isSSODiscoveryConfigured').and.returnValue(true);
|
||||
spyOn(authService, 'ssoImplicitLogin').and.stub();
|
||||
|
||||
component.ngOnInit();
|
||||
fixture.detectChanges();
|
||||
element.querySelector('[data-automation-id="login-button-sso"]').click();
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
expect(getLoginErrorMessage()).toBeUndefined();
|
||||
});
|
||||
}));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -169,7 +169,7 @@ export class LoginComponent implements OnInit, OnDestroy {
|
||||
const provider = this.appConfig.get<string>(AppConfigValues.PROVIDERS);
|
||||
|
||||
this.authService.setRedirect({ provider, url });
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if (this.hasCustomFieldsValidation()) {
|
||||
@@ -200,28 +200,18 @@ export class LoginComponent implements OnInit, OnDestroy {
|
||||
onSubmit(values: any): void {
|
||||
this.disableError();
|
||||
|
||||
if (this.authService.isOauth() && !this.authService.isSSODiscoveryConfigured()) {
|
||||
this.errorMsg = 'LOGIN.MESSAGES.SSO-WRONG-CONFIGURATION';
|
||||
this.isError = true;
|
||||
} else {
|
||||
const args = new LoginSubmitEvent({
|
||||
controls: { username: this.form.controls.username }
|
||||
});
|
||||
this.executeSubmit.emit(args);
|
||||
const args = new LoginSubmitEvent({
|
||||
controls: { username: this.form.controls.username }
|
||||
});
|
||||
this.executeSubmit.emit(args);
|
||||
|
||||
if (!args.defaultPrevented) {
|
||||
this.performLogin(values);
|
||||
}
|
||||
if (!args.defaultPrevented) {
|
||||
this.performLogin(values);
|
||||
}
|
||||
}
|
||||
|
||||
implicitLogin() {
|
||||
if (this.authService.isOauth() && !this.authService.isSSODiscoveryConfigured()) {
|
||||
this.errorMsg = 'LOGIN.MESSAGES.SSO-WRONG-CONFIGURATION';
|
||||
this.isError = true;
|
||||
} else {
|
||||
this.authService.ssoImplicitLogin();
|
||||
}
|
||||
this.authService.ssoImplicitLogin();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -361,7 +351,7 @@ export class LoginComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
getBackgroundUrlImageUrl(): SafeStyle {
|
||||
return this.sanitizer.bypassSecurityTrustStyle(`url(${this.backgroundImageUrl})`);
|
||||
return this.sanitizer.bypassSecurityTrustStyle(`url(${this.backgroundImageUrl})`);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user