From bf407a04f68def7b038d9d5e668eac7efc8794de Mon Sep 17 00:00:00 2001 From: Juanfran Date: Wed, 28 Sep 2016 07:01:33 +0200 Subject: [PATCH] fix discover e2e tests --- e2e/suites/discover/discover-search.e2e.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/e2e/suites/discover/discover-search.e2e.js b/e2e/suites/discover/discover-search.e2e.js index 9fa5bd02..b843bde5 100644 --- a/e2e/suites/discover/discover-search.e2e.js +++ b/e2e/suites/discover/discover-search.e2e.js @@ -40,11 +40,14 @@ describe('discover search', () => { }); it('search by text', async () => { - discoverHelper.searchInput().sendKeys('Project Example 0'); + let projects = discoverHelper.searchProjects(); + let projectTitle = projects.get(0).$('h2 a').getText(); + + discoverHelper.searchInput().sendKeys(projectTitle); discoverHelper.sendSearch(); - let projects = discoverHelper.searchProjects(); + projects = discoverHelper.searchProjects(); expect(await projects.count()).to.be.equal(1); }); });