Skip to content

Commit

Permalink
chore(e2e): update to latest protractor version (#2608)
Browse files Browse the repository at this point in the history
* chore(e2e): update to latest protractor version

* Updates to the latest Protractor version, which now uses Selenium V3
* The new types for Protractor v5 include the fix for the missing `chord` function (See DefinitelyTyped/DefinitelyTyped@123690b)
* Methods like `innerHtml` have been removed in Protractor v5 (https://github.com/angular/protractor/blob/master/CHANGELOG.md)

* Test later chromedriver version
  • Loading branch information
devversion authored and tinayuangao committed Jan 13, 2017
1 parent 7727387 commit 4ab6f30
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@
npm-debug.log
testem.log
/.chrome
yarn.lock
2 changes: 1 addition & 1 deletion e2e/components/dialog/dialog.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,6 @@ describe('dialog', () => {

// TODO(crisbeto): should be moved to a common util. copied from the menu e2e setup.
function expectFocusOn(el: any): void {
expect(browser.driver.switchTo().activeElement().getInnerHtml()).toBe(el.getInnerHtml());
expect(browser.driver.switchTo().activeElement().getId()).toBe(el.getId());
}
});
3 changes: 1 addition & 2 deletions e2e/components/menu/menu-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ export class MenuPage {

// TODO(kara): move to common testing utility
expectFocusOn(el: any): void {
expect(browser.driver.switchTo().activeElement().getInnerHtml())
.toBe(el.getInnerHtml());
expect(browser.driver.switchTo().activeElement().getId()).toBe(el.getId());
}

expectMenuPresent(expected: boolean) {
Expand Down
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,10 @@
"@types/merge2": "0.0.28",
"@types/minimist": "^1.1.28",
"@types/node": "^6.0.34",
"@types/protractor": "^4.0.0",
"@types/run-sequence": "0.0.27",
"@types/rx": "^2.5.33",
"@types/selenium-webdriver": "2.53.36",
"axe-core": "^2.0.7",
"axe-webdriverjs": "^0.4.0",
"axe-webdriverjs": "^0.5.0",
"conventional-changelog": "^1.1.0",
"dgeni": "^0.4.2",
"dgeni-packages": "^0.16.2",
Expand Down Expand Up @@ -91,16 +89,16 @@
"merge2": "^1.0.2",
"minimist": "^1.2.0",
"node-sass": "^3.4.2",
"protractor": "^4.0.8",
"protractor": "^5.0.0",
"resolve-bin": "^0.4.0",
"run-sequence": "^1.2.2",
"sass": "^0.5.0",
"selenium-webdriver": "2.53.3",
"selenium-webdriver": "^3.0.1",
"strip-ansi": "^3.0.0",
"stylelint": "^7.7.0",
"symlink-or-copy": "^1.0.1",
"travis-after-modes": "0.0.7",
"ts-node": "^0.7.3",
"ts-node": "^2.0.0",
"tslint": "^3.13.0",
"typedoc": "^0.5.1",
"typescript": "~2.0.10",
Expand Down
7 changes: 2 additions & 5 deletions test/protractor.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ if (process.env['TRAVIS']) {
config.sauceKey = key;
config.capabilities = {
'browserName': 'chrome',
'version': 'latest',
"chromedriverVersion": "2.26",
'tunnel-identifier': process.env['TRAVIS_JOB_ID'],
'build': process.env['TRAVIS_JOB_ID'],
'name': 'Material 2 E2E Tests',
Expand All @@ -53,11 +55,6 @@ if (process.env['TRAVIS']) {
'recordVideo': false,
'recordScreenshots': false
};

// Because Protractor runs selenium instances concurrently in the CI and each instance
// will create a bloat of logs we don't want to show any info messages.
// Until protractor#1451 is solved, manually disable all info messages.
require('protractor/built/logger').Logger.prototype.info = () => {};
}


Expand Down

0 comments on commit 4ab6f30

Please sign in to comment.