Refactored e2e test naming

This commit is contained in:
Tom Bloor 2017-08-25 11:55:53 +01:00
parent 10ab95044b
commit 7fb84fac70
4 changed files with 16 additions and 15 deletions

View file

@ -1,14 +0,0 @@
import { CoreUIPage } from './app.po';
describe('LocalLoop App', () => {
let page: CoreUIPage;
beforeEach(() => {
page = new CoreUIPage();
});
it('should display message saying app works', () => {
page.navigateTo();
expect(page.getLoginHeaderText()).toEqual('Login');
});
});

14
e2e/login.e2e-spec.ts Normal file
View file

@ -0,0 +1,14 @@
import { LoginPageObject } from './login.po';
describe('Login Page', () => {
let page: LoginPageObject;
beforeEach(() => {
page = new LoginPageObject();
});
it('should have a header saying login', () => {
page.navigateTo();
expect(page.getLoginHeaderText()).toEqual('Login');
});
});

View file

@ -1,6 +1,6 @@
import { browser, element, by } from 'protractor'; import { browser, element, by } from 'protractor';
export class CoreUIPage { export class LoginPageObject {
navigateTo() { navigateTo() {
return browser.get('/'); return browser.get('/');
} }

View file

@ -6,6 +6,7 @@
"target": "es5", "target": "es5",
"types": [ "types": [
"jasmine", "jasmine",
"jasminewd2",
"node" "node"
] ]
} }