{"action":"created","issue":{"url":"https://api.github.com/repos/alphagov/smart-answers/issues/1954","labels_url":"https://api.github.com/repos/alphagov/smart-answers/issues/1954/labels{/name}","comments_url":"https://api.github.com/repos/alphagov/smart-answers/issues/1954/comments","events_url":"https://api.github.com/repos/alphagov/smart-answers/issues/1954/events","html_url":"https://github.com/alphagov/smart-answers/pull/1954","id":107546457,"number":1954,"title":"Add regression tests for question pages","user":{"login":"floehopper","id":3169,"avatar_url":"https://avatars.githubusercontent.com/u/3169?v=3","gravatar_id":"","url":"https://api.github.com/users/floehopper","html_url":"https://github.com/floehopper","followers_url":"https://api.github.com/users/floehopper/followers","following_url":"https://api.github.com/users/floehopper/following{/other_user}","gists_url":"https://api.github.com/users/floehopper/gists{/gist_id}","starred_url":"https://api.github.com/users/floehopper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/floehopper/subscriptions","organizations_url":"https://api.github.com/users/floehopper/orgs","repos_url":"https://api.github.com/users/floehopper/repos","events_url":"https://api.github.com/users/floehopper/events{/privacy}","received_events_url":"https://api.github.com/users/floehopper/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-09-21T16:10:59Z","updated_at":"2015-09-23T11:38:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/alphagov/smart-answers/pulls/1954","html_url":"https://github.com/alphagov/smart-answers/pull/1954","diff_url":"https://github.com/alphagov/smart-answers/pull/1954.diff","patch_url":"https://github.com/alphagov/smart-answers/pull/1954.patch"},"body":"This is in preparation for refactoring the code around question pages.\r\n\r\nUnlike the code for outcome pages, question pages have little (?) or no\r\nresponse-related logic, and so, even if we only render the page for each\r\nquestion node *once*, this should give us decent regression test coverage.\r\n\r\nRendering the page for each question just once means that time taken to run\r\nthe regression tests is only very slightly increased.\r\n\r\nUnlike the landing and outcome pages, there is currently no easy way to\r\nrender a simplified (e.g. Govspeak) version of a question page, so we're\r\nrendering the full HTML version of the page for these nodes."},"comment":{"url":"https://api.github.com/repos/alphagov/smart-answers/issues/comments/142574249","html_url":"https://github.com/alphagov/smart-answers/pull/1954#issuecomment-142574249","issue_url":"https://api.github.com/repos/alphagov/smart-answers/issues/1954","id":142574249,"user":{"login":"floehopper","id":3169,"avatar_url":"https://avatars.githubusercontent.com/u/3169?v=3","gravatar_id":"","url":"https://api.github.com/users/floehopper","html_url":"https://github.com/floehopper","followers_url":"https://api.github.com/users/floehopper/followers","following_url":"https://api.github.com/users/floehopper/following{/other_user}","gists_url":"https://api.github.com/users/floehopper/gists{/gist_id}","starred_url":"https://api.github.com/users/floehopper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/floehopper/subscriptions","organizations_url":"https://api.github.com/users/floehopper/orgs","repos_url":"https://api.github.com/users/floehopper/repos","events_url":"https://api.github.com/users/floehopper/events{/privacy}","received_events_url":"https://api.github.com/users/floehopper/received_events","type":"User","site_admin":false},"created_at":"2015-09-23T11:38:35Z","updated_at":"2015-09-23T11:38:35Z","body":"@chrisroos: I've just fixed this and force pushed again. You should be able to see that there are now 5 question page artefacts for marriage abroad in 5fd20581eaaf59386439a11c4913958d84eeebd8 vs 4 in the old version of the same commit 7a311b06d841087458f1212e201e166e904b9010. The fix to the regression test was to record `next_node` in the `visited_nodes` set rather than `current_node`."}}