From b988733553dbd5c367f3748410305aa45a5b3dae Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Fri, 10 Feb 2017 03:22:08 +0200 Subject: [PATCH] test(aio): remove unnecessary hack from e2e tests (#14356) May address #14347. --- aio/e2e/app.e2e-spec.ts | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/aio/e2e/app.e2e-spec.ts b/aio/e2e/app.e2e-spec.ts index 3e70eff31d..2ac6aedb43 100644 --- a/aio/e2e/app.e2e-spec.ts +++ b/aio/e2e/app.e2e-spec.ts @@ -3,34 +3,20 @@ import { SitePage } from './app.po'; describe('site App', function() { let page: SitePage; - beforeAll(done => { - // Hack: CI has been failing on first test so - // buying time by giving the browser a wake-up call. - // Todo: Find and fix the root cause for flakes. - new SitePage().navigateTo().then(done); - }); - beforeEach(() => { page = new SitePage(); + page.navigateTo(); }); it('should show features text after clicking "Features"', () => { - page.navigateTo() - .then(() => { - return page.featureLink.click(); - }) - .then(() => { - expect(page.getDocViewerText()).toContain('Progressive web apps'); - }); + page.featureLink.click().then(() => { + expect(page.getDocViewerText()).toContain('Progressive web apps'); + }); }); it('should convert code-example in pipe.html', () => { - page.navigateTo() - .then(() => { - return page.datePipeLink.click(); - }) - .then(() => { - expect(page.codeExample.count()).toBeGreaterThan(0, 'should have code-example content'); - }); + page.datePipeLink.click().then(() => { + expect(page.codeExample.count()).toBeGreaterThan(0, 'should have code-example content'); + }); }); });