From 788633cc44760ab0de5ec4537962003b6dbdeb19 Mon Sep 17 00:00:00 2001 From: Juanfran Date: Wed, 27 Jan 2016 14:57:34 +0100 Subject: [PATCH] fix project-home e2e tests --- e2e/suites/project-home.e2e.js | 19 ++++++++----------- e2e/utils/common.js | 1 - 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/e2e/suites/project-home.e2e.js b/e2e/suites/project-home.e2e.js index dcaa0ec1..04bfc771 100644 --- a/e2e/suites/project-home.e2e.js +++ b/e2e/suites/project-home.e2e.js @@ -16,9 +16,6 @@ describe('project home', function() { await utils.common.takeScreenshot("project", "home"); }); - it('go to project', async function() { - await utils.common.goToFirstProject(); - }); /* it('timeline filled', function() { expect($$('div[tg-user-timeline-item]').count()).to.be.eventually.above(0); @@ -49,10 +46,10 @@ describe('project home', function() { await browser.waitForAngular(); - let likeActive = utils.common.hasClass(link, 'active'); + let likeActive = await utils.common.hasClass(link, 'active'); let likesCounter = parseInt(await link.$('.track-button-counter').getText(), 10); - expect(likeActive).to.be.eventually.false; + expect(likeActive).to.be.false; expect(likesCounter).to.be.equal(likesCounterOld - 1); }); @@ -65,10 +62,10 @@ describe('project home', function() { await browser.waitForAngular(); await utils.common.takeScreenshot("project", "home-like"); - let likeActive = utils.common.hasClass(link, 'active'); + let likeActive = await utils.common.hasClass(link, 'active'); let likesCounter = parseInt(await link.$('.track-button-counter').getText(), 10); - expect(likeActive).to.be.eventually.true; + expect(likeActive).to.be.true; expect(likesCounter).to.be.equal(likesCounterOld + 1); }); @@ -91,10 +88,10 @@ describe('project home', function() { return await utils.common.hasClass(watchOptions, 'hidden'); }, 4000); - let watchActive = utils.common.hasClass(link, 'active'); + let watchActive = await utils.common.hasClass(link, 'active'); let watchCounter = parseInt(await link.$('.track-button-counter').getText(), 10); - expect(watchActive).to.be.eventually.false; + expect(watchActive).to.be.false; expect(watchCounter).to.be.equal(watchCounterOld - 1); }); @@ -117,12 +114,12 @@ describe('project home', function() { return await utils.common.hasClass(watchOptions, 'hidden'); }, 4000); - let watchActive = utils.common.hasClass(link, 'active'); + let watchActive = await utils.common.hasClass(link, 'active'); let watchCounter = parseInt(await link.$('.track-button-counter').getText(), 10); await utils.common.takeScreenshot("project", "home-watch"); - expect(watchActive).to.be.eventually.true; + expect(watchActive).to.be.true; expect(watchCounter).to.be.equal(watchCounterOld + 1); }); diff --git a/e2e/utils/common.js b/e2e/utils/common.js index 629c9a4e..2b041457 100644 --- a/e2e/utils/common.js +++ b/e2e/utils/common.js @@ -70,7 +70,6 @@ common.link = async function(el) { .mouseMove({x: 10, y: 10}) .perform(); - await browser.wait(async function() { let href = await el.getAttribute('href');