first version of sample.component finished
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import {async, ComponentFixture, fakeAsync, TestBed, tick} from '@angular/core/testing';
|
||||
import { LoginComponent } from './login.component';
|
||||
import {LoginService} from '../login.service';
|
||||
import {ValidationService} from '../validation.service';
|
||||
import {LoginService} from '../services/login.service';
|
||||
import {ValidationService} from '../services/validation.service';
|
||||
import {RbUiComponentsModule} from '@inst-iot/bosch-angular-ui-components';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {By} from '@angular/platform-browser';
|
||||
@ -71,7 +71,7 @@ describe('LoginComponent', () => {
|
||||
|
||||
cssd('.login-button').triggerEventHandler('click', null);
|
||||
fixture.detectChanges();
|
||||
expect(css('.message').innerText).toBe('username must only contain a-z0-9-_.');
|
||||
expect(css('.error-messages > div').innerText).toBe('username must only contain a-z0-9-_.');
|
||||
});
|
||||
|
||||
it('should display a message when a wrong password was entered', () => {
|
||||
@ -102,6 +102,6 @@ describe('LoginComponent', () => {
|
||||
expect(loginServiceSpy.login.calls.count()).toBe(1);
|
||||
tick();
|
||||
fixture.detectChanges();
|
||||
expect(css('.message').innerText).toBe('Wrong credentials! Try again.');
|
||||
expect(css('.message').innerText).toBe('Wrong credentials!');
|
||||
}));
|
||||
});
|
||||
|
Reference in New Issue
Block a user