From 961f5c8994057e70d5fda457683b2cebee1a3870 Mon Sep 17 00:00:00 2001 From: Foxandxss Date: Thu, 7 Jul 2016 12:07:31 +0200 Subject: [PATCH] chore: make animation test wait a bit longer closes #1844 --- public/docs/_examples/animations/e2e-spec.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/public/docs/_examples/animations/e2e-spec.ts b/public/docs/_examples/animations/e2e-spec.ts index 2450e7699b..e2e9b64b9b 100644 --- a/public/docs/_examples/animations/e2e-spec.ts +++ b/public/docs/_examples/animations/e2e-spec.ts @@ -255,7 +255,7 @@ describe('Animation Tests', () => { expect(li.getCssValue('transform')).toMatch(NO_TRANSFORM_MATRIX_REGEX); expect(li.getCssValue('opacity')).toMatch('1'); - removeHero(); + removeHero(700); expect(li.isPresent()).toBe(false); }); @@ -289,19 +289,22 @@ describe('Animation Tests', () => { }); }); - function addActiveHero() { + function addActiveHero(sleep?: number) { + sleep = sleep || 500; element(by.buttonText('Add active hero')).click(); - browser.driver.sleep(500); + browser.driver.sleep(sleep); } - function addInactiveHero() { + function addInactiveHero(sleep?: number) { + sleep = sleep || 500; element(by.buttonText('Add inactive hero')).click(); - browser.driver.sleep(500); + browser.driver.sleep(sleep); } - function removeHero() { + function removeHero(sleep?: number) { + sleep = sleep || 500; element(by.buttonText('Remove hero')).click(); - browser.driver.sleep(500); + browser.driver.sleep(sleep); } function getScaleX(el: protractor.ElementFinder) {