{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/8758","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/8758/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/8758/comments","events_url":"https://api.github.com/repos/angular/angular/issues/8758/events","html_url":"https://github.com/angular/angular/issues/8758","id":156043201,"number":8758,"title":"Protractor E2E tests time out with NG1-NG2 hybrid bootstrapped application.","user":{"login":"bringking","id":864845,"avatar_url":"https://avatars2.githubusercontent.com/u/864845?v=4","gravatar_id":"","url":"https://api.github.com/users/bringking","html_url":"https://github.com/bringking","followers_url":"https://api.github.com/users/bringking/followers","following_url":"https://api.github.com/users/bringking/following{/other_user}","gists_url":"https://api.github.com/users/bringking/gists{/gist_id}","starred_url":"https://api.github.com/users/bringking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bringking/subscriptions","organizations_url":"https://api.github.com/users/bringking/orgs","repos_url":"https://api.github.com/users/bringking/repos","events_url":"https://api.github.com/users/bringking/events{/privacy}","received_events_url":"https://api.github.com/users/bringking/received_events","type":"User","site_admin":false},"labels":[{"id":209239910,"url":"https://api.github.com/repos/angular/angular/labels/comp:%20testing","name":"comp: testing","color":"c7def8","default":false},{"id":130606843,"url":"https://api.github.com/repos/angular/angular/labels/type:%20bug/fix","name":"type: bug/fix","color":"EEEEEE","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-05-20T20:18:34Z","updated_at":"2018-02-26T14:06:47Z","closed_at":"2017-07-04T21:33:17Z","author_association":"NONE","body":"**Steps to reproduce and a minimal demo of the problem**\nSetup a basic NG1 -> NG2 hybrid application and run E2E tests with protractor\n#### Main entry point\n\n``` typescript\n  upgradeAdapter.addProvider([...PROVIDERS, ...ENV_PROVIDERS, ...DIRECTIVES, ...PIPES]);\n\n  return upgradeAdapter.bootstrap(document.documentElement,\n    ['app'], {strictDi: true});\n```\n#### Protractor config\n\n``` js\nconst defaultConfig = {\n  multiCapabilities: [\n    {\n      browserName: 'chrome', true, maxInstances: 6,\n      chromeOptions: { args: ['--lang=en', '--window-size=360,600'] }\n    }\n  ],\n  getPageTimeout: 10000, // How long to wait for a page to load in ms.\n  allScriptsTimeout: 22000,\n  baseUrl: 'http://localhost:3001',\n  specs: `${__dirname}/../test/e2e/*.spec.js`,\n  jasmineNodeOpts: {\n    // If true, print colors to the terminal.\n    showColors: true,\n    // Default time to wait in ms before a test fails.\n    defaultTimeoutInterval: 30000\n  }\n};\n\nmodule.exports = { config: defaultConfig };\n\n```\n#### Sample test\n\n``` js\nconst LoginPage = require('./page-objects/login.page');\nconst NavPage = require('./page-objects/nav.page');\nconst LogHelpers = require('./helpers/log.helper');\n\ndescribe('login', () => {\n  const loginPage = new LoginPage();\n  const navPage = new NavPage();\n  const logHelpers = new LogHelpers();\n\n  beforeEach(() => {\n    browser.get('login');\n  });\n\n  afterEach(() => {\n    logHelpers.expectNoErrors();\n  });\n\n  describe('when valid credentals are given', () => {\n    it('takes user to home', () => {\n      expect(loginPage.submit.isEnabled()).toBe(false);\n      loginPage.loginUser().then(() => {\n        return navPage.logout.click();\n      }).then(() => {\n        return expect(browser.getCurrentUrl()).toMatch(/home/);\n      });\n    });\n  });\n});\n\n```\n\n**Current behavior**\n\nProtractor throws the following error, no matter the timeout- \n\n``` bash\n[chrome #1-10]   Message:\n[chrome #1-10]     Failed: Timed out waiting for Protractor to synchronize with the page after 22 seconds. Please see https://github.com/angular/protractor/blob/master/docs/faq.md\n```\n\n[UPDATE] - \nI have tracked down the behavior to timeout when trying to use the `getCurrentUrl` method. \n\n``` js\n\nthis.loginUser = () => {\n    return this.username.sendKeys('test').then(() => { // this succeeds\n      return this.password.sendKeys('test'); // this succeeds\n    }).then(() => {\n      return this.submit.click(); // this succeeds\n    }).then(() => {\n      expect(browser.getCurrentUrl()).not.toMatch(/login/); // this times out\n    });\n  };\n\n```\n\n**Expected/desired behavior**\n\nA successful test\n\n**Other information**\n\nAngular 1.x Version = 1.5.3\nAngular 2.x Version = 2.0.0-rc.1\nProtractor Version = 3.3.0\n\nPossibly related to this PR - https://github.com/angular/angular/pull/7603\n"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/368514118","html_url":"https://github.com/angular/angular/issues/8758#issuecomment-368514118","issue_url":"https://api.github.com/repos/angular/angular/issues/8758","id":368514118,"user":{"login":"tonybranfort","id":16600957,"avatar_url":"https://avatars3.githubusercontent.com/u/16600957?v=4","gravatar_id":"","url":"https://api.github.com/users/tonybranfort","html_url":"https://github.com/tonybranfort","followers_url":"https://api.github.com/users/tonybranfort/followers","following_url":"https://api.github.com/users/tonybranfort/following{/other_user}","gists_url":"https://api.github.com/users/tonybranfort/gists{/gist_id}","starred_url":"https://api.github.com/users/tonybranfort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tonybranfort/subscriptions","organizations_url":"https://api.github.com/users/tonybranfort/orgs","repos_url":"https://api.github.com/users/tonybranfort/repos","events_url":"https://api.github.com/users/tonybranfort/events{/privacy}","received_events_url":"https://api.github.com/users/tonybranfort/received_events","type":"User","site_admin":false},"created_at":"2018-02-26T14:06:47Z","updated_at":"2018-02-26T14:06:47Z","author_association":"NONE","body":"angular/protractor#4290 is still open without any update since October 2017.  There are definitely people stuck on AngularJS due to that issue.  "}}
{"actor":{"display_login":"tonybranfort"}}