diff --git a/.travis.yml b/.travis.yml index 3416498a..e9c15dbe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,21 +1,32 @@ sudo: required -dist: trusty +dist: xenial + +services: + - xvfb + addons: chrome: stable firefox: latest + language: node_js node_js: -- '8' + - 10 + cache: -- node_modules + - node_modules + before_install: -- export DISPLAY=:99.0 -- sh -e /etc/init.d/xvfb start + - 'export DISPLAY=:99.0' install: -- npm install + - npm install + - npm install webdriver-manager@12.1.7 + # Use newer version of webdriver-manager to allow latest Chrome + # for E2E tests (https://github.com/angular/protractor/issues/5312#issuecomment-531940044). + - rm -rf ./node_modules/protractor/node_modules/webdriver-manager + - ln -s ./node_modules/webdriver-manager ./node_modules/protractor/node_modules/webdriver-manager script: -- npm test && ng e2e + - ng test && ng e2e env: global: - - secure: nbn1MJ/N+shUkYqXqKxzQJw30F8q7XC4LNxuMYuP13deUI1/XzRWh7l6+T37AVQicDoVXbro2ve5hknc5TtGwGJTZnvZRtnGe/vZigj/N/NGYeuiNSNIzNQ9MyqJ0sxvuPEIDhYn5UfXkpweoYFe4Budy4AWvHbeE8KNLfzs4M+YD/Oyi+dyBY+RvWWHYRgfbrc7ZiDoRcx2ZDeYPjs5gWDK0VfG13IIp3YnZIpL8CWjI0+p1BBzTP9eQxtRcumLlxq1Rm7sqtxyyRaFTLgk1eRp/JdPFeRuMsSDTfNNhORTqgNyFeubWIy7LjzxZ6fZr+fLAVUJwncunFnOo6yAV5qe+kvzAepcli43zM9sdJPUn6FRm2fcQtSccW44rHH2HHaaQd0yg0DIbrBB3n6we3kBzyM/N24Y4Z6kU9rpmJvZTcW9GTjfb9zQzhyinsHPfTlNoTPnPc6ae9Kqudc/f7PboThwfML6t+p/beOHsXZfrHaDGRvzwWQrD8VBaUAhEA7ez4aiVmVSaTKY4Or/BJNMj/fkvWsFidFGFHgyOO9k3YE9ibK0tJBTja6UiuqBOG+7IpcfHkArtAeXXvTMS8ON1wUc0HMWSsEVYiNjiLP8rLlnNek5McZT5Vondvp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e2e/src/app.po.ts index 68e1054a..f9f098f4 100644 --- a/e2e/src/app.po.ts +++ b/e2e/src/app.po.ts @@ -39,10 +39,17 @@ export class AppPage { async updateValue( el: WebElement, keys: string[] ) { await el.click(); await this.selectAll(); + // Since Chrome 77 with webdirver-manager@12.1.7 protractor.sendKeys() doesn't + // clear current selection, we have to clean it manually (#51). + await this.delete(); await el.sendKeys( ...keys ); } selectAll() { return browser.executeScript( 'document.execCommand( "selectAll", false, null )' ); } + + delete() { + return browser.executeScript( 'document.execCommand( "delete", false, null )' ); + } }