{"action":"created","comment":{"url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/pulls/comments/78747318","id":78747318,"diff_hunk":"@@ -0,0 +1,233 @@\n+/*\n+ * Copyright 2016 HM Revenue & Customs\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+package views.resident.properties.gain\n+\n+import controllers.helpers.FakeRequestHelper\n+import org.jsoup.Jsoup\n+import uk.gov.hmrc.play.test.{UnitSpec, WithFakeApplication}\n+import views.html.calculation.resident.properties.{gain => views}\n+import assets.MessageLookup.{sellForLess => messages}\n+import assets.{MessageLookup => commonMessages}\n+import forms.resident.properties.SellForLessForm._\n+import models.resident.properties.SellForLessModel\n+\n+class SellForLessViewSpec extends UnitSpec with WithFakeApplication with FakeRequestHelper {\n+\n+  \"Sell for less view with an empty form\" should {\n+\n+    lazy val view = views.sellForLess(sellForLessForm, \"home-link\", Some(\"back-link\"))(fakeRequest)\n+    lazy val doc = Jsoup.parse(view.body)\n+\n+    \"have a charset of UTF-8\" in {\n+      doc.charset.toString shouldBe \"UTF-8\"\n+    }\n+\n+    s\"have a title ${messages.title}\" in {\n+      doc.title shouldBe messages.title\n+    }\n+\n+    \"have a H1 tag that\" should {\n+\n+      lazy val h1Tag = doc.select(\"h1\")\n+\n+      s\"have the page heading '${messages.title}'\" in {\n+        h1Tag.text shouldBe messages.title\n+      }\n+\n+      \"have the heading-large class\" in {\n+        h1Tag.hasClass(\"heading-large\") shouldBe true\n+      }\n+    }\n+\n+    s\"have the home link to 'home'\" in {\n+      doc.select(\"#homeNavHref\").attr(\"href\") shouldEqual \"home-link\"\n+    }\n+\n+    \"have a back button\" which {\n+\n+      lazy val backLink = doc.select(\"a#back-link\")\n+\n+      \"has the correct back link text\" in {\n+        backLink.text shouldBe commonMessages.calcBaseBack\n+      }\n+\n+      \"has the back-link class\" in {\n+        backLink.hasClass(\"back-link\") shouldBe true\n+      }\n+\n+      \"has a back link to 'back'\" in {\n+        backLink.attr(\"href\") shouldBe \"back-link\"\n+      }\n+    }\n+\n+    \"render a form tag with a submit action\" in {\n+      doc.select(\"form\").attr(\"action\") shouldEqual \"/calculate-your-capital-gains/resident/properties/sell-for-less\"\n+    }\n+\n+    \"have a legend for the radio inputs\" which {\n+\n+      lazy val legend = doc.select(\"legend\")\n+\n+      s\"contain the text ${messages.title}\" in {\n+        legend.text should include(s\"${messages.title}\")\n+      }","path":"test/views/resident/properties/gain/SellForLessViewSpec.scala","position":87,"original_position":87,"commit_id":"2f2a4d076a774604fd71f95688afd9355bcdf44d","original_commit_id":"2f2a4d076a774604fd71f95688afd9355bcdf44d","user":{"login":"DavidWoodward37","id":16402038,"avatar_url":"https://avatars.githubusercontent.com/u/16402038?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidWoodward37","html_url":"https://github.com/DavidWoodward37","followers_url":"https://api.github.com/users/DavidWoodward37/followers","following_url":"https://api.github.com/users/DavidWoodward37/following{/other_user}","gists_url":"https://api.github.com/users/DavidWoodward37/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidWoodward37/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidWoodward37/subscriptions","organizations_url":"https://api.github.com/users/DavidWoodward37/orgs","repos_url":"https://api.github.com/users/DavidWoodward37/repos","events_url":"https://api.github.com/users/DavidWoodward37/events{/privacy}","received_events_url":"https://api.github.com/users/DavidWoodward37/received_events","type":"User","site_admin":false},"body":"Maybe check that the legend is also visually hidden?","created_at":"2016-09-14T13:28:10Z","updated_at":"2016-09-14T13:28:10Z","html_url":"https://github.com/hmrc/capital-gains-calculator-frontend/pull/579#discussion_r78747318","pull_request_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/pulls/579","_links":{"self":{"href":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/pulls/comments/78747318"},"html":{"href":"https://github.com/hmrc/capital-gains-calculator-frontend/pull/579#discussion_r78747318"},"pull_request":{"href":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/pulls/579"}}},"pull_request":{"url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/pulls/579","id":85196581,"html_url":"https://github.com/hmrc/capital-gains-calculator-frontend/pull/579","diff_url":"https://github.com/hmrc/capital-gains-calculator-frontend/pull/579.diff","patch_url":"https://github.com/hmrc/capital-gains-calculator-frontend/pull/579.patch","issue_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/issues/579","number":579,"state":"open","locked":false,"title":"Added Sell For Less Page","user":{"login":"morgan-fernandes","id":17067549,"avatar_url":"https://avatars.githubusercontent.com/u/17067549?v=3","gravatar_id":"","url":"https://api.github.com/users/morgan-fernandes","html_url":"https://github.com/morgan-fernandes","followers_url":"https://api.github.com/users/morgan-fernandes/followers","following_url":"https://api.github.com/users/morgan-fernandes/following{/other_user}","gists_url":"https://api.github.com/users/morgan-fernandes/gists{/gist_id}","starred_url":"https://api.github.com/users/morgan-fernandes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morgan-fernandes/subscriptions","organizations_url":"https://api.github.com/users/morgan-fernandes/orgs","repos_url":"https://api.github.com/users/morgan-fernandes/repos","events_url":"https://api.github.com/users/morgan-fernandes/events{/privacy}","received_events_url":"https://api.github.com/users/morgan-fernandes/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-14T09:43:37Z","updated_at":"2016-09-14T13:28:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fa4dfa75a6ff066c878acc54384500cbd8502731","assignee":{"login":"DavidWoodward37","id":16402038,"avatar_url":"https://avatars.githubusercontent.com/u/16402038?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidWoodward37","html_url":"https://github.com/DavidWoodward37","followers_url":"https://api.github.com/users/DavidWoodward37/followers","following_url":"https://api.github.com/users/DavidWoodward37/following{/other_user}","gists_url":"https://api.github.com/users/DavidWoodward37/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidWoodward37/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidWoodward37/subscriptions","organizations_url":"https://api.github.com/users/DavidWoodward37/orgs","repos_url":"https://api.github.com/users/DavidWoodward37/repos","events_url":"https://api.github.com/users/DavidWoodward37/events{/privacy}","received_events_url":"https://api.github.com/users/DavidWoodward37/received_events","type":"User","site_admin":false},"assignees":[{"login":"DavidWoodward37","id":16402038,"avatar_url":"https://avatars.githubusercontent.com/u/16402038?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidWoodward37","html_url":"https://github.com/DavidWoodward37","followers_url":"https://api.github.com/users/DavidWoodward37/followers","following_url":"https://api.github.com/users/DavidWoodward37/following{/other_user}","gists_url":"https://api.github.com/users/DavidWoodward37/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidWoodward37/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidWoodward37/subscriptions","organizations_url":"https://api.github.com/users/DavidWoodward37/orgs","repos_url":"https://api.github.com/users/DavidWoodward37/repos","events_url":"https://api.github.com/users/DavidWoodward37/events{/privacy}","received_events_url":"https://api.github.com/users/DavidWoodward37/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/pulls/579/commits","review_comments_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/pulls/579/comments","review_comment_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/issues/579/comments","statuses_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/statuses/2f2a4d076a774604fd71f95688afd9355bcdf44d","head":{"label":"hmrc:CGT-1905","ref":"CGT-1905","sha":"2f2a4d076a774604fd71f95688afd9355bcdf44d","user":{"login":"hmrc","id":5755339,"avatar_url":"https://avatars.githubusercontent.com/u/5755339?v=3","gravatar_id":"","url":"https://api.github.com/users/hmrc","html_url":"https://github.com/hmrc","followers_url":"https://api.github.com/users/hmrc/followers","following_url":"https://api.github.com/users/hmrc/following{/other_user}","gists_url":"https://api.github.com/users/hmrc/gists{/gist_id}","starred_url":"https://api.github.com/users/hmrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmrc/subscriptions","organizations_url":"https://api.github.com/users/hmrc/orgs","repos_url":"https://api.github.com/users/hmrc/repos","events_url":"https://api.github.com/users/hmrc/events{/privacy}","received_events_url":"https://api.github.com/users/hmrc/received_events","type":"Organization","site_admin":false},"repo":{"id":53857643,"name":"capital-gains-calculator-frontend","full_name":"hmrc/capital-gains-calculator-frontend","owner":{"login":"hmrc","id":5755339,"avatar_url":"https://avatars.githubusercontent.com/u/5755339?v=3","gravatar_id":"","url":"https://api.github.com/users/hmrc","html_url":"https://github.com/hmrc","followers_url":"https://api.github.com/users/hmrc/followers","following_url":"https://api.github.com/users/hmrc/following{/other_user}","gists_url":"https://api.github.com/users/hmrc/gists{/gist_id}","starred_url":"https://api.github.com/users/hmrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmrc/subscriptions","organizations_url":"https://api.github.com/users/hmrc/orgs","repos_url":"https://api.github.com/users/hmrc/repos","events_url":"https://api.github.com/users/hmrc/events{/privacy}","received_events_url":"https://api.github.com/users/hmrc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hmrc/capital-gains-calculator-frontend","description":"","fork":false,"url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend","forks_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/forks","keys_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/teams","hooks_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/hooks","issue_events_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/events","assignees_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/tags","blobs_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/languages","stargazers_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/stargazers","contributors_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/contributors","subscribers_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/subscribers","subscription_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/subscription","commits_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/merges","archive_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/downloads","issues_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/labels{/name}","releases_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/deployments","created_at":"2016-03-14T13:18:41Z","updated_at":"2016-03-15T14:12:30Z","pushed_at":"2016-09-14T13:11:19Z","git_url":"git://github.com/hmrc/capital-gains-calculator-frontend.git","ssh_url":"git@github.com:hmrc/capital-gains-calculator-frontend.git","clone_url":"https://github.com/hmrc/capital-gains-calculator-frontend.git","svn_url":"https://github.com/hmrc/capital-gains-calculator-frontend","homepage":"","size":3917,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"hmrc:master-MVP-2","ref":"master-MVP-2","sha":"12171625391ddae35bff21c7340805f637a5a5b4","user":{"login":"hmrc","id":5755339,"avatar_url":"https://avatars.githubusercontent.com/u/5755339?v=3","gravatar_id":"","url":"https://api.github.com/users/hmrc","html_url":"https://github.com/hmrc","followers_url":"https://api.github.com/users/hmrc/followers","following_url":"https://api.github.com/users/hmrc/following{/other_user}","gists_url":"https://api.github.com/users/hmrc/gists{/gist_id}","starred_url":"https://api.github.com/users/hmrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmrc/subscriptions","organizations_url":"https://api.github.com/users/hmrc/orgs","repos_url":"https://api.github.com/users/hmrc/repos","events_url":"https://api.github.com/users/hmrc/events{/privacy}","received_events_url":"https://api.github.com/users/hmrc/received_events","type":"Organization","site_admin":false},"repo":{"id":53857643,"name":"capital-gains-calculator-frontend","full_name":"hmrc/capital-gains-calculator-frontend","owner":{"login":"hmrc","id":5755339,"avatar_url":"https://avatars.githubusercontent.com/u/5755339?v=3","gravatar_id":"","url":"https://api.github.com/users/hmrc","html_url":"https://github.com/hmrc","followers_url":"https://api.github.com/users/hmrc/followers","following_url":"https://api.github.com/users/hmrc/following{/other_user}","gists_url":"https://api.github.com/users/hmrc/gists{/gist_id}","starred_url":"https://api.github.com/users/hmrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmrc/subscriptions","organizations_url":"https://api.github.com/users/hmrc/orgs","repos_url":"https://api.github.com/users/hmrc/repos","events_url":"https://api.github.com/users/hmrc/events{/privacy}","received_events_url":"https://api.github.com/users/hmrc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hmrc/capital-gains-calculator-frontend","description":"","fork":false,"url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend","forks_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/forks","keys_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/teams","hooks_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/hooks","issue_events_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/events","assignees_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/tags","blobs_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/languages","stargazers_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/stargazers","contributors_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/contributors","subscribers_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/subscribers","subscription_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/subscription","commits_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/merges","archive_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/downloads","issues_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/labels{/name}","releases_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/deployments","created_at":"2016-03-14T13:18:41Z","updated_at":"2016-03-15T14:12:30Z","pushed_at":"2016-09-14T13:11:19Z","git_url":"git://github.com/hmrc/capital-gains-calculator-frontend.git","ssh_url":"git@github.com:hmrc/capital-gains-calculator-frontend.git","clone_url":"https://github.com/hmrc/capital-gains-calculator-frontend.git","svn_url":"https://github.com/hmrc/capital-gains-calculator-frontend","homepage":"","size":3917,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/pulls/579"},"html":{"href":"https://github.com/hmrc/capital-gains-calculator-frontend/pull/579"},"issue":{"href":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/issues/579"},"comments":{"href":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/issues/579/comments"},"review_comments":{"href":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/pulls/579/comments"},"review_comment":{"href":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/pulls/579/commits"},"statuses":{"href":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/statuses/2f2a4d076a774604fd71f95688afd9355bcdf44d"}}}}
{"actor":{"display_login":"DavidWoodward37"}}