[ADF-1873] Remove all deprecated code from ADF (#4145)

* remove deprecated code part 1

* remove deprecation step 2

* fix spellcheck

* fix

* fix lint

* fix not used import

* remove deprecation

* fix test first part after remove deprecation

* fix test

* fix sidebar demo shell
This commit is contained in:
Eugenio Romano
2019-01-15 15:36:01 +00:00
committed by GitHub
parent 24a7c939e6
commit 7d061b2c11
109 changed files with 351 additions and 1106 deletions

View File

@@ -90,7 +90,6 @@ describe('LoginComponent', () => {
});
function loginWithCredentials(username, password, providers: string = 'ECM') {
component.providers = providers;
usernameInput.value = username;
passwordInput.value = password;
@@ -116,6 +115,8 @@ describe('LoginComponent', () => {
});
it('should redirect to previous route state on successful login', () => {
appConfigService.config.providers = 'ECM';
spyOn(authService, 'login').and.returnValue(of({ type: 'type', ticket: 'ticket' }));
const redirect = '/home';
component.successRoute = redirect;
@@ -393,7 +394,6 @@ describe('LoginComponent', () => {
it('should return success event after the login have succeeded', (done) => {
spyOn(authService, 'login').and.returnValue(of({ type: 'type', ticket: 'ticket' }));
component.providers = 'ECM';
expect(component.isError).toBe(false);
component.success.subscribe(() => {
@@ -409,7 +409,6 @@ describe('LoginComponent', () => {
});
it('should return error with a wrong username', (done) => {
component.providers = 'ECM';
component.error.subscribe(() => {
fixture.detectChanges();
@@ -424,8 +423,6 @@ describe('LoginComponent', () => {
});
it('should return error with a wrong password', (done) => {
component.providers = 'ECM';
component.error.subscribe(() => {
fixture.detectChanges();
fixture.whenStable().then(() => {
@@ -440,8 +437,6 @@ describe('LoginComponent', () => {
});
it('should return error with a wrong username and password', (done) => {
component.providers = 'ECM';
component.error.subscribe(() => {
fixture.detectChanges();
fixture.whenStable().then(() => {
@@ -462,7 +457,6 @@ describe('LoginComponent', () => {
message: 'ERROR: the network is offline, Origin is not allowed by Access-Control-Allow-Origin'
}
}));
component.providers = 'ECM';
component.error.subscribe(() => {
fixture.detectChanges();
@@ -480,7 +474,6 @@ describe('LoginComponent', () => {
it('should return CSRF error when server CSRF error occurs', async(() => {
spyOn(authService, 'login')
.and.returnValue(throwError({ message: 'ERROR: Invalid CSRF-token', status: 403 }));
component.providers = 'ECM';
component.error.subscribe(() => {
fixture.detectChanges();
@@ -502,7 +495,6 @@ describe('LoginComponent', () => {
status: 403
}
));
component.providers = 'ECM';
component.error.subscribe(() => {
fixture.detectChanges();
@@ -516,8 +508,6 @@ describe('LoginComponent', () => {
}));
it('should emit success event after the login has succeeded and discard password', async(() => {
component.providers = 'ECM';
component.success.subscribe((event) => {
fixture.detectChanges();
@@ -532,7 +522,6 @@ describe('LoginComponent', () => {
it('should emit error event after the login has failed', async(() => {
spyOn(authService, 'login').and.returnValue(throwError('Fake server error'));
component.providers = 'ECM';
component.error.subscribe((error) => {
fixture.detectChanges();