{"action":"closed","issue":{"url":"https://api.github.com/repos/gri-is/portal/issues/373","repository_url":"https://api.github.com/repos/gri-is/portal","labels_url":"https://api.github.com/repos/gri-is/portal/issues/373/labels{/name}","comments_url":"https://api.github.com/repos/gri-is/portal/issues/373/comments","events_url":"https://api.github.com/repos/gri-is/portal/issues/373/events","html_url":"https://github.com/gri-is/portal/issues/373","id":142840212,"number":373,"title":"e2e Page Object - ResultsPage - getHitsTitles, possibly others, not working right","user":{"login":"adamcee","id":4441280,"avatar_url":"https://avatars.githubusercontent.com/u/4441280?v=3","gravatar_id":"","url":"https://api.github.com/users/adamcee","html_url":"https://github.com/adamcee","followers_url":"https://api.github.com/users/adamcee/followers","following_url":"https://api.github.com/users/adamcee/following{/other_user}","gists_url":"https://api.github.com/users/adamcee/gists{/gist_id}","starred_url":"https://api.github.com/users/adamcee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamcee/subscriptions","organizations_url":"https://api.github.com/users/adamcee/orgs","repos_url":"https://api.github.com/users/adamcee/repos","events_url":"https://api.github.com/users/adamcee/events{/privacy}","received_events_url":"https://api.github.com/users/adamcee/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/gri-is/portal/labels/severity:%20high","name":"severity: high","color":"FF464E"},{"url":"https://api.github.com/repos/gri-is/portal/labels/tool:%20javascript","name":"tool: javascript","color":"fbca04"},{"url":"https://api.github.com/repos/gri-is/portal/labels/type:%20bug","name":"type: bug","color":"e11d21"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/gri-is/portal/milestones/19","html_url":"https://github.com/gri-is/portal/milestones/Sprint%207%20-%203/29/2016%20","labels_url":"https://api.github.com/repos/gri-is/portal/milestones/19/labels","id":1657881,"number":19,"title":"Sprint 7 - 3/29/2016 ","description":"","creator":{"login":"joshuago78","id":349633,"avatar_url":"https://avatars.githubusercontent.com/u/349633?v=3","gravatar_id":"","url":"https://api.github.com/users/joshuago78","html_url":"https://github.com/joshuago78","followers_url":"https://api.github.com/users/joshuago78/followers","following_url":"https://api.github.com/users/joshuago78/following{/other_user}","gists_url":"https://api.github.com/users/joshuago78/gists{/gist_id}","starred_url":"https://api.github.com/users/joshuago78/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshuago78/subscriptions","organizations_url":"https://api.github.com/users/joshuago78/orgs","repos_url":"https://api.github.com/users/joshuago78/repos","events_url":"https://api.github.com/users/joshuago78/events{/privacy}","received_events_url":"https://api.github.com/users/joshuago78/received_events","type":"User","site_admin":false},"open_issues":17,"closed_issues":11,"state":"open","created_at":"2016-03-21T16:47:48Z","updated_at":"2016-04-19T18:08:59Z","due_on":"2016-04-19T07:00:00Z","closed_at":null},"comments":3,"created_at":"2016-03-23T02:30:05Z","updated_at":"2016-04-19T18:08:59Z","closed_at":"2016-04-19T18:08:59Z","body":"@joshuago78 @jfranco-gri \r\nI ran into this while trying to do a length check on search results for pagination tests. I think I have found a bug with `ResultsPage.getHitsTitles`, and `getsHitsDates`, etc. \r\n\r\nIf I'm using the functions incorrectly please let me know. \r\n\r\n**To Reproduce**\r\nOn develop, in search-sort.e2e.spec.js, for the \"should sort by title\" test, add the following line at the end of the `it` block for that test:\r\n`expect(resultsPage.getHitsTitles().length).toEqual(24);`\r\n\r\nIf you then run the test with \r\n`protractor protractor.config.js --specs='test/e2e/search-sort.e2e.spec.js'`\r\nyou should see the error *\"Expected 0 to equal 24\"*.\r\n\r\nSince there are results on the page (you can see it in the browser when the test runs, and can confirm in other ways too), we should be seeing an array with a positive length (should be 24 for \"painting\" query). \r\n\r\nWithout the added line, all those tests should pass on develop.\r\n\r\nI think what has happened is that for `getHitsTitles`, `getHitsDates`, etc, all our tests so far have only used those functions to test sorting, and there have been no checks on length of that array or on the actual contents on the array directly. Sorting on nothing I think is passing tests OK as nothing can be sorted whatever way.\r\n\r\nA variety of e2e tests are using these functions right now.\r\n\r\nI thought that the issue could be the `return title` in `getsHitsTitles` being outside of the `.then(` block but when I changed this it did not resolve the issue.  "}}