attempt to fix an issue where the e2e tests on travis fail because a select doesn't exist yet

This commit is contained in:
Art Lowel
2017-10-30 16:20:10 +01:00
parent 58ccf86ff8
commit 1b3ade4df5
2 changed files with 5 additions and 3 deletions

View File

@@ -11,7 +11,7 @@ language: node_js
node_js:
- "6"
- "7"
- "8"
cache:
yarn: true

View File

@@ -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<string> {
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<string> {