From 1b3ade4df571e93e41e4cc436ee57ba2d4612e17 Mon Sep 17 00:00:00 2001 From: Art Lowel Date: Mon, 30 Oct 2017 16:20:10 +0100 Subject: [PATCH] attempt to fix an issue where the e2e tests on travis fail because a select doesn't exist yet --- .travis.yml | 2 +- e2e/search-page/search-page.po.ts | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5ebcb69d6d..bc539060e7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ language: node_js node_js: - "6" - - "7" + - "8" cache: yarn: true diff --git a/e2e/search-page/search-page.po.ts b/e2e/search-page/search-page.po.ts index b1a17ee150..5ea9a0019b 100644 --- a/e2e/search-page/search-page.po.ts +++ b/e2e/search-page/search-page.po.ts @@ -1,4 +1,4 @@ -import { browser, element, by } from 'protractor'; +import { browser, element, by, protractor } from 'protractor'; import { promise } from 'selenium-webdriver'; export class ProtractorPage { @@ -17,7 +17,9 @@ export class ProtractorPage { } getCurrentScope(): promise.Promise { - return element(by.tagName('select')).getAttribute('value'); + const scopeSelect = element(by.tagName('select')); + browser.wait(protractor.ExpectedConditions.presenceOf(scopeSelect), 10000); + return scopeSelect.getAttribute('value'); } getCurrentQuery(): promise.Promise {