{"action":"created","issue":{"url":"https://api.github.com/repos/dylants/price-finder/issues/55","repository_url":"https://api.github.com/repos/dylants/price-finder","labels_url":"https://api.github.com/repos/dylants/price-finder/issues/55/labels{/name}","comments_url":"https://api.github.com/repos/dylants/price-finder/issues/55/comments","events_url":"https://api.github.com/repos/dylants/price-finder/issues/55/events","html_url":"https://github.com/dylants/price-finder/pull/55","id":135268039,"number":55,"title":"E2E tests: refactor and add to Travis CI","user":{"login":"dylants","id":1596740,"avatar_url":"https://avatars.githubusercontent.com/u/1596740?v=3","gravatar_id":"","url":"https://api.github.com/users/dylants","html_url":"https://github.com/dylants","followers_url":"https://api.github.com/users/dylants/followers","following_url":"https://api.github.com/users/dylants/following{/other_user}","gists_url":"https://api.github.com/users/dylants/gists{/gist_id}","starred_url":"https://api.github.com/users/dylants/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dylants/subscriptions","organizations_url":"https://api.github.com/users/dylants/orgs","repos_url":"https://api.github.com/users/dylants/repos","events_url":"https://api.github.com/users/dylants/events{/privacy}","received_events_url":"https://api.github.com/users/dylants/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dylants/price-finder/labels/feature","name":"feature","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-21T22:21:16Z","updated_at":"2016-02-21T22:30:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dylants/price-finder/pulls/55","html_url":"https://github.com/dylants/price-finder/pull/55","diff_url":"https://github.com/dylants/price-finder/pull/55.diff","patch_url":"https://github.com/dylants/price-finder/pull/55.patch"},"body":"Two general things were done in this pull request around the end to end tests:\r\n- Refactor the tests to pull out common function into a `test-helper.js` file.  This includes the environment variable setup for Jasmine, creating a single price-finder instance, and defining a set of helper test functions.  This resolves #53.\r\n- Add the end to end tests to the Travis CI build.  In order to avoid problems, increase the timeout for each e2e test to a _really_ high value, and set the retry sleep time for price finder's scraping utility to a high value (to avoid spamming).  We also had to include the key to access Best Buy in an encrypted format within the .travis.yml file ([reference Travis CI documentation](https://docs.travis-ci.com/user/environment-variables/#Encrypted-Variables)).  This resolves #52.\r\n\r\nThe document linked below explains how we can have both unit and e2e tests run in parallel, with the unit tests likely to finish first to show early feedback of pull requests:\r\nhttps://docs.travis-ci.com/user/speeding-up-the-build/#Parallelizing-your-builds-across-virtual-machines\r\n\r\nIn addition to the changes mentioned above, some additional changes were necessary:\r\n- In the Best Buy unit test, account for the Best Buy key environment variable (after the changes we made above).  Update the test to allow for either case.\r\n- Sleep after each Best Buy end to end test to avoid spamming the API\r\n- Fix a callback error message in price-finder's main library, found in debugging these problems."},"comment":{"url":"https://api.github.com/repos/dylants/price-finder/issues/comments/186934631","html_url":"https://github.com/dylants/price-finder/pull/55#issuecomment-186934631","issue_url":"https://api.github.com/repos/dylants/price-finder/issues/55","id":186934631,"user":{"login":"dylants","id":1596740,"avatar_url":"https://avatars.githubusercontent.com/u/1596740?v=3","gravatar_id":"","url":"https://api.github.com/users/dylants","html_url":"https://github.com/dylants","followers_url":"https://api.github.com/users/dylants/followers","following_url":"https://api.github.com/users/dylants/following{/other_user}","gists_url":"https://api.github.com/users/dylants/gists{/gist_id}","starred_url":"https://api.github.com/users/dylants/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dylants/subscriptions","organizations_url":"https://api.github.com/users/dylants/orgs","repos_url":"https://api.github.com/users/dylants/repos","events_url":"https://api.github.com/users/dylants/events{/privacy}","received_events_url":"https://api.github.com/users/dylants/received_events","type":"User","site_admin":false},"created_at":"2016-02-21T22:30:24Z","updated_at":"2016-02-21T22:30:24Z","body":"If this PR is merged, the site generator will need to be updated:\r\nhttps://github.com/dylants/generator-price-finder-site"}}