From 7fb84fac70fe16d525878984313de9249ebe9285 Mon Sep 17 00:00:00 2001 From: Tom Bloor Date: Fri, 25 Aug 2017 11:55:53 +0100 Subject: [PATCH] Refactored e2e test naming --- e2e/app.e2e-spec.ts | 14 -------------- e2e/login.e2e-spec.ts | 14 ++++++++++++++ e2e/{app.po.ts => login.po.ts} | 2 +- e2e/tsconfig.e2e.json | 1 + 4 files changed, 16 insertions(+), 15 deletions(-) delete mode 100644 e2e/app.e2e-spec.ts create mode 100644 e2e/login.e2e-spec.ts rename e2e/{app.po.ts => login.po.ts} (85%) diff --git a/e2e/app.e2e-spec.ts b/e2e/app.e2e-spec.ts deleted file mode 100644 index b9a83ba..0000000 --- a/e2e/app.e2e-spec.ts +++ /dev/null @@ -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'); - }); -}); diff --git a/e2e/login.e2e-spec.ts b/e2e/login.e2e-spec.ts new file mode 100644 index 0000000..da43980 --- /dev/null +++ b/e2e/login.e2e-spec.ts @@ -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'); + }); +}); diff --git a/e2e/app.po.ts b/e2e/login.po.ts similarity index 85% rename from e2e/app.po.ts rename to e2e/login.po.ts index 21a02b3..b4ddb0c 100644 --- a/e2e/app.po.ts +++ b/e2e/login.po.ts @@ -1,6 +1,6 @@ import { browser, element, by } from 'protractor'; -export class CoreUIPage { +export class LoginPageObject { navigateTo() { return browser.get('/'); } diff --git a/e2e/tsconfig.e2e.json b/e2e/tsconfig.e2e.json index e2a9a2f..39b800f 100644 --- a/e2e/tsconfig.e2e.json +++ b/e2e/tsconfig.e2e.json @@ -6,6 +6,7 @@ "target": "es5", "types": [ "jasmine", + "jasminewd2", "node" ] }