test: initialize e2e-testing with login page (#698)

Fixes: #697
This commit is contained in:
Karan Takalkar
2020-05-11 16:16:19 +05:30
committed by GitHub
parent a0e0d4812d
commit 332e514771
5 changed files with 67 additions and 55 deletions
+24
View File
@@ -0,0 +1,24 @@
import { browser, by, element } from 'protractor';
import { LoginPage } from './login.po';
describe('app', () => {
let page: LoginPage;
beforeAll(() => {
page = new LoginPage();
});
it('should display login page', () => {
expect(browser.getCurrentUrl()).toContain('/login');
});
it('should display error with invalid credentials', () => {
page.invalidLogin();
expect(element(by.tagName('mat-error')).isPresent()).toBe(true);
});
it('should login into the app', () => {
page.validLogin();
});
});