Skip to content

Automated Testing FAQ's

Josh Chudy edited this page Oct 21, 2016 · 33 revisions

FAQ's related to E2E testing using Protractor and Jasmine


  • Page being automatically reloaded during test ? I am writing test for recordset in Chaise. But after page is loaded, the address bar is updated with extra “/” after “#”.So the original url http://…/#1234/schema:table which becomes http://…/#/1234/schema:table, and that causes app to throw error.

    This issue has been documented here. It happens because of the default angular routing. Protractor depends on it. We are not using the default angular routing in Chaise and Protractor tries to use that when we are changing the location using browser.get. For now you just want to get rid of the explicit routing that has been added in your apps as seen here.


  • There are errors with the import module 'ermrest-data-utils' importing schemas in the test

    This is mostly because of some changes in the ermrest-data-utils module. Just update it using command npm update ermrest-data-utils


  • Test Failed: "defer.fulfill" is not a function

    This is mostyl because of a newer version of the promise library Q. We have fixed the version to ^1.4.1. If you face issues with any other modules, just try to fix their version numbers in the package.json to the last stable version.


  • Installation issues: saying selenium not found or unable to run tests because of selenium issue or some other module issue

    The best way to tackle this is deleting your node_modules folder and reinstall all dependencies. Once you're done deleting the folder, run sudo make deps. This command will install all possible dependencies defined in the package.json and update your selenium-driver.

    An alternative is to run this command: node_modules/.bin/webdriver-manager update --standalone


  • Error while clicking a button or finding an element, saying unable to find element/element is not clickable ?

    Most of the times when you're trying to look for an element which is rendered as a result of some AJAX or asynchronous operation, you should either wait for it to be rendered or add a delay. Waiting for an element to be visible with a timeout is stable and achievable. This can be done using browser.wait and can be seen in action here


  • Failed: Error while waiting for Protractor to sync with the page: "[ng:test] no injector found for element argument to getTestability.http://errors.angularjs.org/1.5.5/ng/test

    You will get this error when you don't explicitly call browser.get(browser.params.url || ""); in the beforeAll section of your test-case. You should always have a browser.get as Protractor doesn't understands which page should it run the tests against. You can refer a sample here


  • Extending webauthn cookie duration

    By default, webauthn cookies expire after 30 minutes. To change your cookie's expiration, here's how:

  • If you don't have your webauthn cookie yet, get it by:

  • Log in to a machine (e.g. dev.isrd.isi.edu) and become the root user.

  ssh dev.isrd.isi.edu
  sudo su -
  • Switch to the ermrestddl user.
  su - ermrestddl
  • Access the list of sessions from webauthn.
  psql webauthn
  select * from webauthn2_globus_auth.session;
  • Set your new expiration timestamp for your cookie. In the following example, my cookie is EwUuy327498dDfuidY32djh3 and I want it expire on 2016-12-31.
  update webauthn2_globus_auth.session set expires='2016-12-31' where key='EwUuy327498dDfuidY32djh3';
Clone this wiki locally